diff --git a/changelog/v1.18.0-beta23/ai-prioritized-endpoints.yaml b/changelog/v1.18.0-beta23/ai-prioritized-endpoints.yaml new file mode 100644 index 00000000000..eba5b582510 --- /dev/null +++ b/changelog/v1.18.0-beta23/ai-prioritized-endpoints.yaml @@ -0,0 +1,5 @@ +changelog: + - type: NEW_FEATURE + issueLink: https://github.com/solo-io/solo-projects/issues/6957 + description: >- + Add an API to allow configuring prioritized pools of LLM backends. diff --git a/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/ai/ai.proto.sk.md b/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/ai/ai.proto.sk.md index dfa003ba4c7..8f73f152ba2 100644 --- a/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/ai/ai.proto.sk.md +++ b/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/ai/ai.proto.sk.md @@ -18,7 +18,11 @@ weight: 5 - [AzureOpenAI](#azureopenai) - [Mistral](#mistral) - [Anthropic](#anthropic) +- [MultiPool](#multipool) +- [Backend](#backend) +- [Priority](#priority) - [RouteSettings](#routesettings) +- [RouteType](#routetype) - [FieldDefault](#fielddefault) - [Postgres](#postgres) - [Embedding](#embedding) @@ -130,15 +134,17 @@ port: 443 # Port is optional and will default to 443 for HTTPS "mistral": .ai.options.gloo.solo.io.UpstreamSpec.Mistral "anthropic": .ai.options.gloo.solo.io.UpstreamSpec.Anthropic "azureOpenai": .ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI +"multi": .ai.options.gloo.solo.io.UpstreamSpec.MultiPool ``` | Field | Type | Description | | ----- | ---- | ----------- | -| `openai` | [.ai.options.gloo.solo.io.UpstreamSpec.OpenAI](../ai.proto.sk/#openai) | OpenAI upstream. Only one of `openai`, `mistral`, `anthropic`, or `azureOpenai` can be set. | -| `mistral` | [.ai.options.gloo.solo.io.UpstreamSpec.Mistral](../ai.proto.sk/#mistral) | Mistral upstream. Only one of `mistral`, `openai`, `anthropic`, or `azureOpenai` can be set. | -| `anthropic` | [.ai.options.gloo.solo.io.UpstreamSpec.Anthropic](../ai.proto.sk/#anthropic) | Anthropic upstream. Only one of `anthropic`, `openai`, `mistral`, or `azureOpenai` can be set. | -| `azureOpenai` | [.ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI](../ai.proto.sk/#azureopenai) | Azure OpenAI upstream. Only one of `azureOpenai`, `openai`, `mistral`, or `anthropic` can be set. | +| `openai` | [.ai.options.gloo.solo.io.UpstreamSpec.OpenAI](../ai.proto.sk/#openai) | OpenAI upstream. Only one of `openai`, `mistral`, `anthropic`, `azureOpenai`, or `multi` can be set. | +| `mistral` | [.ai.options.gloo.solo.io.UpstreamSpec.Mistral](../ai.proto.sk/#mistral) | Mistral upstream. Only one of `mistral`, `openai`, `anthropic`, `azureOpenai`, or `multi` can be set. | +| `anthropic` | [.ai.options.gloo.solo.io.UpstreamSpec.Anthropic](../ai.proto.sk/#anthropic) | Anthropic upstream. Only one of `anthropic`, `openai`, `mistral`, `azureOpenai`, or `multi` can be set. | +| `azureOpenai` | [.ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI](../ai.proto.sk/#azureopenai) | Azure OpenAI upstream. Only one of `azureOpenai`, `openai`, `mistral`, `anthropic`, or `multi` can be set. | +| `multi` | [.ai.options.gloo.solo.io.UpstreamSpec.MultiPool](../ai.proto.sk/#multipool) | multi upstream. Only one of `multi`, `openai`, `mistral`, `anthropic`, or `azureOpenai` can be set. | @@ -157,7 +163,7 @@ port: 443 # Port is optional and will default to 443 for HTTPS | Field | Type | Description | | ----- | ---- | ----------- | | `host` | `string` | Custom host to send the traffic to. | -| `port` | `int` | Custom host to send the traffic to. | +| `port` | `int` | Custom port to send the traffic to. | @@ -171,6 +177,7 @@ Settings for the OpenAI API ```yaml "authToken": .ai.options.gloo.solo.io.SingleAuthToken "customHost": .ai.options.gloo.solo.io.UpstreamSpec.CustomHost +"model": string ``` @@ -178,6 +185,7 @@ Settings for the OpenAI API | ----- | ---- | ----------- | | `authToken` | [.ai.options.gloo.solo.io.SingleAuthToken](../ai.proto.sk/#singleauthtoken) | Auth Token to use for the OpenAI API This token will be placed into the `Authorization` header and prefixed with Bearer if not present when sending the request to the upstream. | | `customHost` | [.ai.options.gloo.solo.io.UpstreamSpec.CustomHost](../ai.proto.sk/#customhost) | Optional custom host to send the traffic to. | +| `model` | `string` | Optional: override model name. If not set, the model name will be taken from the request This can be useful when trying model failover scenarios e.g. "gpt-4o-mini". | @@ -191,13 +199,17 @@ Settings for the Azure OpenAI API ```yaml "authToken": .ai.options.gloo.solo.io.SingleAuthToken "endpoint": string +"deploymentName": string +"apiVersion": string ``` | Field | Type | Description | | ----- | ---- | ----------- | | `authToken` | [.ai.options.gloo.solo.io.SingleAuthToken](../ai.proto.sk/#singleauthtoken) | Auth Token to use for the OpenAI API This token will be placed into the `api-key` header. | -| `endpoint` | `string` | (REQUIRED) The endpoint to use This should be the endpoint to the Azure OpenAI API, e.g. my-endpoint.openai.azure.com If the scheme is included it will be stripped. | +| `endpoint` | `string` | The endpoint to use This should be the endpoint to the Azure OpenAI API, e.g. my-endpoint.openai.azure.com If the scheme is included it will be stripped. This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version}. | +| `deploymentName` | `string` | The deployment/model name to use This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version}. | +| `apiVersion` | `string` | The version of the API to use This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version}. | @@ -211,6 +223,7 @@ Settings for the Mistral API ```yaml "authToken": .ai.options.gloo.solo.io.SingleAuthToken "customHost": .ai.options.gloo.solo.io.UpstreamSpec.CustomHost +"model": string ``` @@ -218,6 +231,7 @@ Settings for the Mistral API | ----- | ---- | ----------- | | `authToken` | [.ai.options.gloo.solo.io.SingleAuthToken](../ai.proto.sk/#singleauthtoken) | Auth Token to use for the Mistral API. This token will be placed into the `Authorization` header and prefixed with Bearer if not present when sending the request to the upstream. | | `customHost` | [.ai.options.gloo.solo.io.UpstreamSpec.CustomHost](../ai.proto.sk/#customhost) | Optional custom host to send the traffic to. | +| `model` | `string` | Optional: override model name. If not set, the model name will be taken from the request This can be useful when trying model failover scenarios. | @@ -231,6 +245,7 @@ Settings for the Mistral API "authToken": .ai.options.gloo.solo.io.SingleAuthToken "customHost": .ai.options.gloo.solo.io.UpstreamSpec.CustomHost "version": string +"model": string ``` @@ -239,6 +254,91 @@ Settings for the Mistral API | `authToken` | [.ai.options.gloo.solo.io.SingleAuthToken](../ai.proto.sk/#singleauthtoken) | Auth Token to use for the Anthropic API. This token will be placed into the `x-api-key` header when sending the request to the upstream. | | `customHost` | [.ai.options.gloo.solo.io.UpstreamSpec.CustomHost](../ai.proto.sk/#customhost) | | | `version` | `string` | An optional version header to pass to the Anthropic API See: https://docs.anthropic.com/en/api/versioning for more details. | +| `model` | `string` | Optional: override model name. If not set, the model name will be taken from the request This can be useful when trying model failover scenarios. | + + + + +--- +### MultiPool + + +multi: +pools: +- pool: +- openai: +authToken: +secretRef: +name: openai-secret +namespace: gloo-system +priority: 1 +- pool: +- azureOpenai: +deploymentName: gpt-4o-mini +apiVersion: 2024-02-15-preview +endpoint: ai-gateway.openai.azure.com +authToken: +secretRef: +name: azure-secret +namespace: gloo-system +- azureOpenai: +deploymentName: gpt-4o-mini-2 +apiVersion: 2024-02-15-preview +endpoint: ai-gateway.openai.azure.com +authToken: +secretRef: +name: azure-secret +namespace: gloo-system +priority: 2 + +```yaml +"priorities": []ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Priority + +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `priorities` | [[]ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Priority](../ai.proto.sk/#priority) | List of prioritized backend pools. | + + + + +--- +### Backend + + + +```yaml +"openai": .ai.options.gloo.solo.io.UpstreamSpec.OpenAI +"mistral": .ai.options.gloo.solo.io.UpstreamSpec.Mistral +"anthropic": .ai.options.gloo.solo.io.UpstreamSpec.Anthropic +"azureOpenai": .ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI + +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `openai` | [.ai.options.gloo.solo.io.UpstreamSpec.OpenAI](../ai.proto.sk/#openai) | OpenAI upstream. Only one of `openai`, `mistral`, `anthropic`, or `azureOpenai` can be set. | +| `mistral` | [.ai.options.gloo.solo.io.UpstreamSpec.Mistral](../ai.proto.sk/#mistral) | Mistral upstream. Only one of `mistral`, `openai`, `anthropic`, or `azureOpenai` can be set. | +| `anthropic` | [.ai.options.gloo.solo.io.UpstreamSpec.Anthropic](../ai.proto.sk/#anthropic) | Anthropic upstream. Only one of `anthropic`, `openai`, `mistral`, or `azureOpenai` can be set. | +| `azureOpenai` | [.ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI](../ai.proto.sk/#azureopenai) | Azure OpenAI upstream. Only one of `azureOpenai`, `openai`, `mistral`, or `anthropic` can be set. | + + + + +--- +### Priority + + + +```yaml +"pool": []ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend + +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `pool` | [[]ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend](../ai.proto.sk/#backend) | | @@ -252,9 +352,9 @@ This allows users to configure things like: - Prompt Enrichment - Retrieval Augmented Generation - Semantic Caching -- Backup Models - Defaults to merge with the user input fields - Guardrails +- Route Type NOTE: These settings may only be applied to a route which uses an LLMProvider backend! @@ -263,8 +363,8 @@ NOTE: These settings may only be applied to a route which uses an LLMProvider ba "promptGuard": .ai.options.gloo.solo.io.AIPromptGaurd "rag": .ai.options.gloo.solo.io.RAG "semanticCache": .ai.options.gloo.solo.io.SemanticCache -"backupModels": []string "defaults": []ai.options.gloo.solo.io.FieldDefault +"routeType": .ai.options.gloo.solo.io.RouteSettings.RouteType ``` @@ -274,8 +374,20 @@ NOTE: These settings may only be applied to a route which uses an LLMProvider ba | `promptGuard` | [.ai.options.gloo.solo.io.AIPromptGaurd](../ai.proto.sk/#aipromptgaurd) | Guards to apply to the LLM requests on this route. This can be used to reject requests based on the content of the prompt, as well as mask responses based on the content of the response. These guards can be also be used at the same time. Below is a simple example of a prompt guard that will reject any prompt that contains the string "credit card" and will mask any credit card numbers in the response. ``` promptGuard: request: customResponseMessage: "Rejected due to inappropriate content" matches: - "credit card" response: matches: # Mastercard - '(?:^|\D)(5[1-5][0-9]{2}(?:\ |\-|)[0-9]{4}(?:\ |\-|)[0-9]{4}(?:\ |\-|)[0-9]{4})(?:\D|$)' ````. | | `rag` | [.ai.options.gloo.solo.io.RAG](../ai.proto.sk/#rag) | Retrieval Augmented Generation. https://research.ibm.com/blog/retrieval-augmented-generation-RAG Retrieval Augmented Generation is a process by which you "augment" the information a model has access to by providing it with a set of documents to use as context. This can be used to improve the quality of the generated text. Important Note: The same embedding mechanism must be used for the prompt which was used for the initial creation of the context documents. Example using postgres for storage and OpenAI for embedding: ``` rag: datastore: postgres: connectionString: postgresql+psycopg://gloo:gloo@172.17.0.1:6024/gloo collectionName: default embedding: openai: authToken: secretRef: name: openai-secret namespace: gloo-system ```. | | `semanticCache` | [.ai.options.gloo.solo.io.SemanticCache](../ai.proto.sk/#semanticcache) | Semantic caching configuration Semantic caching allows you to cache previous model responses in order to provide faster responses to similar requests in the future. Results will vary depending on the embedding mechanism used, as well as the similarity threshold set. Example using Redis for storage and OpenAI for embedding: ``` semanticCache: datastore: redis: connectionString: redis://172.17.0.1:6379 embedding: openai: authToken: secretRef: name: openai-secret namespace: gloo-system ```. | -| `backupModels` | `[]string` | Backup models to use in case of a failure with the primary model passed in the request. By default each model will be tried 2 times before moving on to the next model in the list. If all requests fail then the final response will be returned to the client. | | `defaults` | [[]ai.options.gloo.solo.io.FieldDefault](../ai.proto.sk/#fielddefault) | A list of defaults to be merged with the user input fields. These will NOT override the user input fields unless override is explicitly set to true. Some examples include setting the temperature, max_tokens, etc. Example overriding system field for Anthropic: ``` # Anthropic doesn't support a system chat type defaults: - field: "system" value: "answer all questions in french" ``` Example setting the temperature and max_tokens, overriding max_tokens: ``` defaults: - field: "temperature" value: 0.5 - field: "max_tokens" value: 100 ```. | +| `routeType` | [.ai.options.gloo.solo.io.RouteSettings.RouteType](../ai.proto.sk/#routetype) | The type of route this is, currently only CHAT is supported. | + + + + +--- +### RouteType + + + +| Name | Description | +| ----- | ----------- | +| `CHAT` | | @@ -372,9 +484,9 @@ NOTE: These settings may only be applied to a route which uses an LLMProvider ba | Field | Type | Description | | ----- | ---- | ----------- | | `authToken` | [.ai.options.gloo.solo.io.SingleAuthToken](../ai.proto.sk/#singleauthtoken) | Auth Token to use for the OpenAI API This token will be placed into the `api-key` header. | -| `apiVersion` | `string` | (REQUIRED) The version of the API to use. | -| `endpoint` | `string` | (REQUIRED) The endpoint to use This should be the endpoint to the Azure OpenAI API, e.g. https://my-endpoint.openai.azure.com If the scheme isn't included it will be added. | -| `deploymentName` | `string` | (REQUIRED) The deployment/model name to use. | +| `apiVersion` | `string` | The version of the API to use This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version}. | +| `endpoint` | `string` | The endpoint to use This should be the endpoint to the Azure OpenAI API, e.g. https://my-endpoint.openai.azure.com If the scheme isn't included it will be added. This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version}. | +| `deploymentName` | `string` | The deployment/model name to use This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version}. | diff --git a/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/retries/retries.proto.sk.md b/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/retries/retries.proto.sk.md index 0749bc86ac4..1d6f61c07a5 100644 --- a/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/retries/retries.proto.sk.md +++ b/docs/content/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/options/retries/retries.proto.sk.md @@ -56,6 +56,7 @@ Retry Policy applied at the Route and/or Virtual Hosts levels. "perTryTimeout": .google.protobuf.Duration "retryBackOff": .retries.options.gloo.solo.io.RetryBackOff "previousPriorities": .retries.options.gloo.solo.io.RetryPolicy.PreviousPriorities +"retriableStatusCodes": []int ``` @@ -66,6 +67,7 @@ Retry Policy applied at the Route and/or Virtual Hosts levels. | `perTryTimeout` | [.google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/duration) | Specifies a non-zero upstream timeout per retry attempt. This parameter is optional. | | `retryBackOff` | [.retries.options.gloo.solo.io.RetryBackOff](../retries.proto.sk/#retrybackoff) | Specifies the retry policy interval. | | `previousPriorities` | [.retries.options.gloo.solo.io.RetryPolicy.PreviousPriorities](../retries.proto.sk/#previouspriorities) | Specify the previous priorities. For more information about previous priorities, see the [Envoy docs](https://www.envoyproxy.io/docs/envoy/v1.30.1/api-v3/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto#envoy-v3-api-file-envoy-extensions-retry-priority-previous-priorities-v3-previous-priorities-config-proto). | +| `retriableStatusCodes` | `[]int` | Optional: HTTP status codes that should trigger a retry in addition to those specified by retry_on. This can be useful if you want to retry on a status code that is not in the retry_on list. Specifically those in the 4xx range. | diff --git a/install/helm/gloo/crds/gateway.solo.io_v1_RouteOption.yaml b/install/helm/gloo/crds/gateway.solo.io_v1_RouteOption.yaml index c34f1ab595d..5fd0465366f 100644 --- a/install/helm/gloo/crds/gateway.solo.io_v1_RouteOption.yaml +++ b/install/helm/gloo/crds/gateway.solo.io_v1_RouteOption.yaml @@ -35,10 +35,6 @@ spec: properties: ai: properties: - backupModels: - items: - type: string - type: array defaults: items: properties: @@ -149,6 +145,9 @@ spec: promptTemplate: type: string type: object + routeType: + type: string + x-kubernetes-int-or-string: true semanticCache: properties: datastore: @@ -1573,6 +1572,12 @@ spec: nullable: true type: integer type: object + retriableStatusCodes: + items: + maximum: 4294967295 + minimum: 0 + type: integer + type: array retryBackOff: properties: baseInterval: diff --git a/install/helm/gloo/crds/gateway.solo.io_v1_RouteTable.yaml b/install/helm/gloo/crds/gateway.solo.io_v1_RouteTable.yaml index ee3da29f451..5220942909f 100644 --- a/install/helm/gloo/crds/gateway.solo.io_v1_RouteTable.yaml +++ b/install/helm/gloo/crds/gateway.solo.io_v1_RouteTable.yaml @@ -145,10 +145,6 @@ spec: properties: ai: properties: - backupModels: - items: - type: string - type: array defaults: items: properties: @@ -259,6 +255,9 @@ spec: promptTemplate: type: string type: object + routeType: + type: string + x-kubernetes-int-or-string: true semanticCache: properties: datastore: @@ -1683,6 +1682,12 @@ spec: nullable: true type: integer type: object + retriableStatusCodes: + items: + maximum: 4294967295 + minimum: 0 + type: integer + type: array retryBackOff: properties: baseInterval: diff --git a/install/helm/gloo/crds/gateway.solo.io_v1_VirtualHostOption.yaml b/install/helm/gloo/crds/gateway.solo.io_v1_VirtualHostOption.yaml index f735d30811f..19c90dc600d 100644 --- a/install/helm/gloo/crds/gateway.solo.io_v1_VirtualHostOption.yaml +++ b/install/helm/gloo/crds/gateway.solo.io_v1_VirtualHostOption.yaml @@ -1342,6 +1342,12 @@ spec: nullable: true type: integer type: object + retriableStatusCodes: + items: + maximum: 4294967295 + minimum: 0 + type: integer + type: array retryBackOff: properties: baseInterval: diff --git a/install/helm/gloo/crds/gateway.solo.io_v1_VirtualService.yaml b/install/helm/gloo/crds/gateway.solo.io_v1_VirtualService.yaml index cd77441bf75..f21e2ae4a45 100644 --- a/install/helm/gloo/crds/gateway.solo.io_v1_VirtualService.yaml +++ b/install/helm/gloo/crds/gateway.solo.io_v1_VirtualService.yaml @@ -1432,6 +1432,12 @@ spec: nullable: true type: integer type: object + retriableStatusCodes: + items: + maximum: 4294967295 + minimum: 0 + type: integer + type: array retryBackOff: properties: baseInterval: @@ -3158,10 +3164,6 @@ spec: properties: ai: properties: - backupModels: - items: - type: string - type: array defaults: items: properties: @@ -3272,6 +3274,9 @@ spec: promptTemplate: type: string type: object + routeType: + type: string + x-kubernetes-int-or-string: true semanticCache: properties: datastore: @@ -4696,6 +4701,12 @@ spec: nullable: true type: integer type: object + retriableStatusCodes: + items: + maximum: 4294967295 + minimum: 0 + type: integer + type: array retryBackOff: properties: baseInterval: diff --git a/install/helm/gloo/crds/gloo.solo.io_v1_Upstream.yaml b/install/helm/gloo/crds/gloo.solo.io_v1_Upstream.yaml index 6757e983dd7..b480a69f648 100644 --- a/install/helm/gloo/crds/gloo.solo.io_v1_Upstream.yaml +++ b/install/helm/gloo/crds/gloo.solo.io_v1_Upstream.yaml @@ -48,11 +48,15 @@ spec: minimum: 0 type: integer type: object + model: + type: string version: type: string type: object azureOpenai: properties: + apiVersion: + type: string authToken: properties: inline: @@ -65,6 +69,8 @@ spec: type: string type: object type: object + deploymentName: + type: string endpoint: type: string type: object @@ -91,6 +97,122 @@ spec: minimum: 0 type: integer type: object + model: + type: string + type: object + multi: + properties: + priorities: + items: + properties: + pool: + items: + properties: + anthropic: + properties: + authToken: + properties: + inline: + type: string + secretRef: + properties: + name: + type: string + namespace: + type: string + type: object + type: object + customHost: + properties: + host: + type: string + port: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + model: + type: string + version: + type: string + type: object + azureOpenai: + properties: + apiVersion: + type: string + authToken: + properties: + inline: + type: string + secretRef: + properties: + name: + type: string + namespace: + type: string + type: object + type: object + deploymentName: + type: string + endpoint: + type: string + type: object + mistral: + properties: + authToken: + properties: + inline: + type: string + secretRef: + properties: + name: + type: string + namespace: + type: string + type: object + type: object + customHost: + properties: + host: + type: string + port: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + model: + type: string + type: object + openai: + properties: + authToken: + properties: + inline: + type: string + secretRef: + properties: + name: + type: string + namespace: + type: string + type: object + type: object + customHost: + properties: + host: + type: string + port: + maximum: 4294967295 + minimum: 0 + type: integer + type: object + model: + type: string + type: object + type: object + type: array + type: object + type: array type: object openai: properties: @@ -115,6 +237,8 @@ spec: minimum: 0 type: integer type: object + model: + type: string type: object type: object aws: diff --git a/projects/gloo/api/v1/enterprise/options/ai/ai.proto b/projects/gloo/api/v1/enterprise/options/ai/ai.proto index 671eab25b50..94c369cc004 100644 --- a/projects/gloo/api/v1/enterprise/options/ai/ai.proto +++ b/projects/gloo/api/v1/enterprise/options/ai/ai.proto @@ -81,7 +81,7 @@ message UpstreamSpec { message CustomHost { // Custom host to send the traffic to string host = 1; - // Custom host to send the traffic to + // Custom port to send the traffic to uint32 port = 2; } @@ -94,6 +94,10 @@ message UpstreamSpec { SingleAuthToken auth_token = 1; // Optional custom host to send the traffic to CustomHost custom_host = 2; + // Optional: override model name. If not set, the model name will be taken from the request + // This can be useful when trying model failover scenarios + // e.g. "gpt-4o-mini" + string model = 3; } // Settings for the Azure OpenAI API @@ -106,11 +110,19 @@ message UpstreamSpec { SingleAuthToken auth_token = 1; // use AD or other workload identity mechanism } - - // (REQUIRED) The endpoint to use + + + // The endpoint to use // This should be the endpoint to the Azure OpenAI API, e.g. my-endpoint.openai.azure.com // If the scheme is included it will be stripped. + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} string endpoint = 2; + // The deployment/model name to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} + string deployment_name = 3; + // The version of the API to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} + string api_version = 4; } // Settings for the Mistral API @@ -122,6 +134,9 @@ message UpstreamSpec { SingleAuthToken auth_token = 1; // Optional custom host to send the traffic to CustomHost custom_host = 2; + // Optional: override model name. If not set, the model name will be taken from the request + // This can be useful when trying model failover scenarios + string model = 3; } message Anthropic { @@ -134,8 +149,70 @@ message UpstreamSpec { // An optional version header to pass to the Anthropic API // See: https://docs.anthropic.com/en/api/versioning for more details string version = 3; + // Optional: override model name. If not set, the model name will be taken from the request + // This can be useful when trying model failover scenarios + string model = 4; + } + + + // Composite AI upstream allows you to create a single upstream that + // is composed of many upstreams. This is useful for creating a single + // logical endpoint made up of many backends. + // The top level list defines the priority of the endpoints, the 2nd + // level allows for defining either a list, or a single endpoint for that priority. + // Note: Only 2 levels of of nesting are allowed, Anything after that will be ignored. + /* + multi: + pools: + - pool: + - openai: + authToken: + secretRef: + name: openai-secret + namespace: gloo-system + priority: 1 + - pool: + - azureOpenai: + deploymentName: gpt-4o-mini + apiVersion: 2024-02-15-preview + endpoint: ai-gateway.openai.azure.com + authToken: + secretRef: + name: azure-secret + namespace: gloo-system + - azureOpenai: + deploymentName: gpt-4o-mini-2 + apiVersion: 2024-02-15-preview + endpoint: ai-gateway.openai.azure.com + authToken: + secretRef: + name: azure-secret + namespace: gloo-system + priority: 2 + */ + message MultiPool { + message Backend { + oneof llm { + // OpenAI upstream + OpenAI openai = 1; + // Mistral upstream + Mistral mistral = 2; + // Anthropic upstream + Anthropic anthropic = 3; + // Azure OpenAI upstream + AzureOpenAI azure_openai = 4; + } + } + + message Priority { + repeated Backend pool = 1; + } + + // List of prioritized backend pools + repeated Priority priorities = 1; } + oneof llm { // OpenAI upstream OpenAI openai = 1; @@ -145,6 +222,8 @@ message UpstreamSpec { Anthropic anthropic = 3; // Azure OpenAI upstream AzureOpenAI azure_openai = 4; + // multi upstream + MultiPool multi = 5; } } @@ -154,9 +233,9 @@ message UpstreamSpec { - Prompt Enrichment - Retrieval Augmented Generation - Semantic Caching - - Backup Models - Defaults to merge with the user input fields - Guardrails + - Route Type NOTE: These settings may only be applied to a route which uses an LLMProvider backend! */ @@ -255,12 +334,6 @@ message RouteSettings { */ SemanticCache semantic_cache = 4; - // Backup models to use in case of a failure with the primary model - // passed in the request. By default each model will be tried 2 times - // before moving on to the next model in the list. If all requests fail then - // the final response will be returned to the client. - repeated string backup_models = 5; - /* A list of defaults to be merged with the user input fields. These will NOT override the user input fields unless override is explicitly set to true. @@ -283,7 +356,14 @@ message RouteSettings { value: 100 ``` */ - repeated FieldDefault defaults = 6; + repeated FieldDefault defaults = 5; + + enum RouteType { + CHAT = 0; + } + + // The type of route this is, currently only CHAT is supported + RouteType route_type = 6; } message FieldDefault { @@ -323,13 +403,16 @@ message Embedding { // google.protobuf.Empty inherit_backend_token = 3; } - // (REQUIRED) The version of the API to use + // The version of the API to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} string api_version = 2; - // (REQUIRED) The endpoint to use + // The endpoint to use // This should be the endpoint to the Azure OpenAI API, e.g. https://my-endpoint.openai.azure.com // If the scheme isn't included it will be added. + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} string endpoint = 3; - // (REQUIRED) The deployment/model name to use + // The deployment/model name to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} string deployment_name = 4; } diff --git a/projects/gloo/api/v1/options/retries/retries.proto b/projects/gloo/api/v1/options/retries/retries.proto index d15c7985100..b04e6732e16 100644 --- a/projects/gloo/api/v1/options/retries/retries.proto +++ b/projects/gloo/api/v1/options/retries/retries.proto @@ -42,7 +42,7 @@ message RetryPolicy { google.protobuf.Duration per_try_timeout = 3; // Specifies the retry policy interval - RetryBackOff retry_back_off= 4; + RetryBackOff retry_back_off = 4; message PreviousPriorities { // Specify the update frequency for the previous priorities. For more information about previous priorities, see the [Envoy docs](https://www.envoyproxy.io/docs/envoy/v1.30.1/api-v3/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto#envoy-v3-api-file-envoy-extensions-retry-priority-previous-priorities-v3-previous-priorities-config-proto). @@ -55,4 +55,10 @@ message RetryPolicy { // For more information about previous priorities, see the [Envoy docs](https://www.envoyproxy.io/docs/envoy/v1.30.1/api-v3/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto#envoy-v3-api-file-envoy-extensions-retry-priority-previous-priorities-v3-previous-priorities-config-proto). PreviousPriorities previous_priorities = 5; } + + + // Optional: HTTP status codes that should trigger a retry in addition to those specified by retry_on. + // This can be useful if you want to retry on a status code that is not in the retry_on list. + // Specifically those in the 4xx range. + repeated uint32 retriable_status_codes = 6; } \ No newline at end of file diff --git a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.clone.go b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.clone.go index 4ef9a3c4d8c..bc797f179b7 100644 --- a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.clone.go +++ b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.clone.go @@ -120,6 +120,18 @@ func (m *UpstreamSpec) Clone() proto.Message { } } + case *UpstreamSpec_Multi: + + if h, ok := interface{}(m.GetMulti()).(clone.Cloner); ok { + target.Llm = &UpstreamSpec_Multi{ + Multi: h.Clone().(*UpstreamSpec_MultiPool), + } + } else { + target.Llm = &UpstreamSpec_Multi{ + Multi: proto.Clone(m.GetMulti()).(*UpstreamSpec_MultiPool), + } + } + } return target @@ -157,15 +169,6 @@ func (m *RouteSettings) Clone() proto.Message { target.SemanticCache = proto.Clone(m.GetSemanticCache()).(*SemanticCache) } - if m.GetBackupModels() != nil { - target.BackupModels = make([]string, len(m.GetBackupModels())) - for idx, v := range m.GetBackupModels() { - - target.BackupModels[idx] = v - - } - } - if m.GetDefaults() != nil { target.Defaults = make([]*FieldDefault, len(m.GetDefaults())) for idx, v := range m.GetDefaults() { @@ -179,6 +182,8 @@ func (m *RouteSettings) Clone() proto.Message { } } + target.RouteType = m.GetRouteType() + return target } @@ -424,6 +429,8 @@ func (m *UpstreamSpec_OpenAI) Clone() proto.Message { target.CustomHost = proto.Clone(m.GetCustomHost()).(*UpstreamSpec_CustomHost) } + target.Model = m.GetModel() + return target } @@ -437,6 +444,10 @@ func (m *UpstreamSpec_AzureOpenAI) Clone() proto.Message { target.Endpoint = m.GetEndpoint() + target.DeploymentName = m.GetDeploymentName() + + target.ApiVersion = m.GetApiVersion() + switch m.AuthTokenSource.(type) { case *UpstreamSpec_AzureOpenAI_AuthToken: @@ -476,6 +487,8 @@ func (m *UpstreamSpec_Mistral) Clone() proto.Message { target.CustomHost = proto.Clone(m.GetCustomHost()).(*UpstreamSpec_CustomHost) } + target.Model = m.GetModel() + return target } @@ -501,6 +514,119 @@ func (m *UpstreamSpec_Anthropic) Clone() proto.Message { target.Version = m.GetVersion() + target.Model = m.GetModel() + + return target +} + +// Clone function +func (m *UpstreamSpec_MultiPool) Clone() proto.Message { + var target *UpstreamSpec_MultiPool + if m == nil { + return target + } + target = &UpstreamSpec_MultiPool{} + + if m.GetPriorities() != nil { + target.Priorities = make([]*UpstreamSpec_MultiPool_Priority, len(m.GetPriorities())) + for idx, v := range m.GetPriorities() { + + if h, ok := interface{}(v).(clone.Cloner); ok { + target.Priorities[idx] = h.Clone().(*UpstreamSpec_MultiPool_Priority) + } else { + target.Priorities[idx] = proto.Clone(v).(*UpstreamSpec_MultiPool_Priority) + } + + } + } + + return target +} + +// Clone function +func (m *UpstreamSpec_MultiPool_Backend) Clone() proto.Message { + var target *UpstreamSpec_MultiPool_Backend + if m == nil { + return target + } + target = &UpstreamSpec_MultiPool_Backend{} + + switch m.Llm.(type) { + + case *UpstreamSpec_MultiPool_Backend_Openai: + + if h, ok := interface{}(m.GetOpenai()).(clone.Cloner); ok { + target.Llm = &UpstreamSpec_MultiPool_Backend_Openai{ + Openai: h.Clone().(*UpstreamSpec_OpenAI), + } + } else { + target.Llm = &UpstreamSpec_MultiPool_Backend_Openai{ + Openai: proto.Clone(m.GetOpenai()).(*UpstreamSpec_OpenAI), + } + } + + case *UpstreamSpec_MultiPool_Backend_Mistral: + + if h, ok := interface{}(m.GetMistral()).(clone.Cloner); ok { + target.Llm = &UpstreamSpec_MultiPool_Backend_Mistral{ + Mistral: h.Clone().(*UpstreamSpec_Mistral), + } + } else { + target.Llm = &UpstreamSpec_MultiPool_Backend_Mistral{ + Mistral: proto.Clone(m.GetMistral()).(*UpstreamSpec_Mistral), + } + } + + case *UpstreamSpec_MultiPool_Backend_Anthropic: + + if h, ok := interface{}(m.GetAnthropic()).(clone.Cloner); ok { + target.Llm = &UpstreamSpec_MultiPool_Backend_Anthropic{ + Anthropic: h.Clone().(*UpstreamSpec_Anthropic), + } + } else { + target.Llm = &UpstreamSpec_MultiPool_Backend_Anthropic{ + Anthropic: proto.Clone(m.GetAnthropic()).(*UpstreamSpec_Anthropic), + } + } + + case *UpstreamSpec_MultiPool_Backend_AzureOpenai: + + if h, ok := interface{}(m.GetAzureOpenai()).(clone.Cloner); ok { + target.Llm = &UpstreamSpec_MultiPool_Backend_AzureOpenai{ + AzureOpenai: h.Clone().(*UpstreamSpec_AzureOpenAI), + } + } else { + target.Llm = &UpstreamSpec_MultiPool_Backend_AzureOpenai{ + AzureOpenai: proto.Clone(m.GetAzureOpenai()).(*UpstreamSpec_AzureOpenAI), + } + } + + } + + return target +} + +// Clone function +func (m *UpstreamSpec_MultiPool_Priority) Clone() proto.Message { + var target *UpstreamSpec_MultiPool_Priority + if m == nil { + return target + } + target = &UpstreamSpec_MultiPool_Priority{} + + if m.GetPool() != nil { + target.Pool = make([]*UpstreamSpec_MultiPool_Backend, len(m.GetPool())) + for idx, v := range m.GetPool() { + + if h, ok := interface{}(v).(clone.Cloner); ok { + target.Pool[idx] = h.Clone().(*UpstreamSpec_MultiPool_Backend) + } else { + target.Pool[idx] = proto.Clone(v).(*UpstreamSpec_MultiPool_Backend) + } + + } + } + return target } diff --git a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.equal.go b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.equal.go index 3f92affcf2d..3a9a881fe5e 100644 --- a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.equal.go +++ b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.equal.go @@ -165,6 +165,21 @@ func (m *UpstreamSpec) Equal(that interface{}) bool { } } + case *UpstreamSpec_Multi: + if _, ok := target.Llm.(*UpstreamSpec_Multi); !ok { + return false + } + + if h, ok := interface{}(m.GetMulti()).(equality.Equalizer); ok { + if !h.Equal(target.GetMulti()) { + return false + } + } else { + if !proto.Equal(m.GetMulti(), target.GetMulti()) { + return false + } + } + default: // m is nil but target is not nil if m.Llm != target.Llm { @@ -236,17 +251,6 @@ func (m *RouteSettings) Equal(that interface{}) bool { } } - if len(m.GetBackupModels()) != len(target.GetBackupModels()) { - return false - } - for idx, v := range m.GetBackupModels() { - - if strings.Compare(v, target.GetBackupModels()[idx]) != 0 { - return false - } - - } - if len(m.GetDefaults()) != len(target.GetDefaults()) { return false } @@ -264,6 +268,10 @@ func (m *RouteSettings) Equal(that interface{}) bool { } + if m.GetRouteType() != target.GetRouteType() { + return false + } + return true } @@ -714,6 +722,10 @@ func (m *UpstreamSpec_OpenAI) Equal(that interface{}) bool { } } + if strings.Compare(m.GetModel(), target.GetModel()) != 0 { + return false + } + return true } @@ -742,6 +754,14 @@ func (m *UpstreamSpec_AzureOpenAI) Equal(that interface{}) bool { return false } + if strings.Compare(m.GetDeploymentName(), target.GetDeploymentName()) != 0 { + return false + } + + if strings.Compare(m.GetApiVersion(), target.GetApiVersion()) != 0 { + return false + } + switch m.AuthTokenSource.(type) { case *UpstreamSpec_AzureOpenAI_AuthToken: @@ -810,6 +830,10 @@ func (m *UpstreamSpec_Mistral) Equal(that interface{}) bool { } } + if strings.Compare(m.GetModel(), target.GetModel()) != 0 { + return false + } + return true } @@ -858,6 +882,185 @@ func (m *UpstreamSpec_Anthropic) Equal(that interface{}) bool { return false } + if strings.Compare(m.GetModel(), target.GetModel()) != 0 { + return false + } + + return true +} + +// Equal function +func (m *UpstreamSpec_MultiPool) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + target, ok := that.(*UpstreamSpec_MultiPool) + if !ok { + that2, ok := that.(UpstreamSpec_MultiPool) + if ok { + target = &that2 + } else { + return false + } + } + if target == nil { + return m == nil + } else if m == nil { + return false + } + + if len(m.GetPriorities()) != len(target.GetPriorities()) { + return false + } + for idx, v := range m.GetPriorities() { + + if h, ok := interface{}(v).(equality.Equalizer); ok { + if !h.Equal(target.GetPriorities()[idx]) { + return false + } + } else { + if !proto.Equal(v, target.GetPriorities()[idx]) { + return false + } + } + + } + + return true +} + +// Equal function +func (m *UpstreamSpec_MultiPool_Backend) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + target, ok := that.(*UpstreamSpec_MultiPool_Backend) + if !ok { + that2, ok := that.(UpstreamSpec_MultiPool_Backend) + if ok { + target = &that2 + } else { + return false + } + } + if target == nil { + return m == nil + } else if m == nil { + return false + } + + switch m.Llm.(type) { + + case *UpstreamSpec_MultiPool_Backend_Openai: + if _, ok := target.Llm.(*UpstreamSpec_MultiPool_Backend_Openai); !ok { + return false + } + + if h, ok := interface{}(m.GetOpenai()).(equality.Equalizer); ok { + if !h.Equal(target.GetOpenai()) { + return false + } + } else { + if !proto.Equal(m.GetOpenai(), target.GetOpenai()) { + return false + } + } + + case *UpstreamSpec_MultiPool_Backend_Mistral: + if _, ok := target.Llm.(*UpstreamSpec_MultiPool_Backend_Mistral); !ok { + return false + } + + if h, ok := interface{}(m.GetMistral()).(equality.Equalizer); ok { + if !h.Equal(target.GetMistral()) { + return false + } + } else { + if !proto.Equal(m.GetMistral(), target.GetMistral()) { + return false + } + } + + case *UpstreamSpec_MultiPool_Backend_Anthropic: + if _, ok := target.Llm.(*UpstreamSpec_MultiPool_Backend_Anthropic); !ok { + return false + } + + if h, ok := interface{}(m.GetAnthropic()).(equality.Equalizer); ok { + if !h.Equal(target.GetAnthropic()) { + return false + } + } else { + if !proto.Equal(m.GetAnthropic(), target.GetAnthropic()) { + return false + } + } + + case *UpstreamSpec_MultiPool_Backend_AzureOpenai: + if _, ok := target.Llm.(*UpstreamSpec_MultiPool_Backend_AzureOpenai); !ok { + return false + } + + if h, ok := interface{}(m.GetAzureOpenai()).(equality.Equalizer); ok { + if !h.Equal(target.GetAzureOpenai()) { + return false + } + } else { + if !proto.Equal(m.GetAzureOpenai(), target.GetAzureOpenai()) { + return false + } + } + + default: + // m is nil but target is not nil + if m.Llm != target.Llm { + return false + } + } + + return true +} + +// Equal function +func (m *UpstreamSpec_MultiPool_Priority) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + target, ok := that.(*UpstreamSpec_MultiPool_Priority) + if !ok { + that2, ok := that.(UpstreamSpec_MultiPool_Priority) + if ok { + target = &that2 + } else { + return false + } + } + if target == nil { + return m == nil + } else if m == nil { + return false + } + + if len(m.GetPool()) != len(target.GetPool()) { + return false + } + for idx, v := range m.GetPool() { + + if h, ok := interface{}(v).(equality.Equalizer); ok { + if !h.Equal(target.GetPool()[idx]) { + return false + } + } else { + if !proto.Equal(v, target.GetPool()[idx]) { + return false + } + } + + } + return true } diff --git a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.go b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.go index c63ce6e023e..2e575a3be22 100644 --- a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.go +++ b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.go @@ -27,6 +27,49 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type RouteSettings_RouteType int32 + +const ( + RouteSettings_CHAT RouteSettings_RouteType = 0 +) + +// Enum value maps for RouteSettings_RouteType. +var ( + RouteSettings_RouteType_name = map[int32]string{ + 0: "CHAT", + } + RouteSettings_RouteType_value = map[string]int32{ + "CHAT": 0, + } +) + +func (x RouteSettings_RouteType) Enum() *RouteSettings_RouteType { + p := new(RouteSettings_RouteType) + *p = x + return p +} + +func (x RouteSettings_RouteType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RouteSettings_RouteType) Descriptor() protoreflect.EnumDescriptor { + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[0].Descriptor() +} + +func (RouteSettings_RouteType) Type() protoreflect.EnumType { + return &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[0] +} + +func (x RouteSettings_RouteType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RouteSettings_RouteType.Descriptor instead. +func (RouteSettings_RouteType) EnumDescriptor() ([]byte, []int) { + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_rawDescGZIP(), []int{2, 0} +} + type SemanticCache_Mode int32 const ( @@ -59,11 +102,11 @@ func (x SemanticCache_Mode) String() string { } func (SemanticCache_Mode) Descriptor() protoreflect.EnumDescriptor { - return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[0].Descriptor() + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[1].Descriptor() } func (SemanticCache_Mode) Type() protoreflect.EnumType { - return &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[0] + return &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[1] } func (x SemanticCache_Mode) Number() protoreflect.EnumNumber { @@ -115,11 +158,11 @@ func (x AIPromptGaurd_Response_BuiltIn) String() string { } func (AIPromptGaurd_Response_BuiltIn) Descriptor() protoreflect.EnumDescriptor { - return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[1].Descriptor() + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[2].Descriptor() } func (AIPromptGaurd_Response_BuiltIn) Type() protoreflect.EnumType { - return &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[1] + return &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes[2] } func (x AIPromptGaurd_Response_BuiltIn) Number() protoreflect.EnumNumber { @@ -278,6 +321,7 @@ type UpstreamSpec struct { // *UpstreamSpec_Mistral_ // *UpstreamSpec_Anthropic_ // *UpstreamSpec_AzureOpenai + // *UpstreamSpec_Multi Llm isUpstreamSpec_Llm `protobuf_oneof:"llm"` } @@ -348,6 +392,13 @@ func (x *UpstreamSpec) GetAzureOpenai() *UpstreamSpec_AzureOpenAI { return nil } +func (x *UpstreamSpec) GetMulti() *UpstreamSpec_MultiPool { + if x, ok := x.GetLlm().(*UpstreamSpec_Multi); ok { + return x.Multi + } + return nil +} + type isUpstreamSpec_Llm interface { isUpstreamSpec_Llm() } @@ -372,6 +423,11 @@ type UpstreamSpec_AzureOpenai struct { AzureOpenai *UpstreamSpec_AzureOpenAI `protobuf:"bytes,4,opt,name=azure_openai,json=azureOpenai,proto3,oneof"` } +type UpstreamSpec_Multi struct { + // multi upstream + Multi *UpstreamSpec_MultiPool `protobuf:"bytes,5,opt,name=multi,proto3,oneof"` +} + func (*UpstreamSpec_Openai) isUpstreamSpec_Llm() {} func (*UpstreamSpec_Mistral_) isUpstreamSpec_Llm() {} @@ -380,14 +436,16 @@ func (*UpstreamSpec_Anthropic_) isUpstreamSpec_Llm() {} func (*UpstreamSpec_AzureOpenai) isUpstreamSpec_Llm() {} +func (*UpstreamSpec_Multi) isUpstreamSpec_Llm() {} + // RouteSettings is a way to configure the behavior of the LLM provider on a per-route basis // This allows users to configure things like: // - Prompt Enrichment // - Retrieval Augmented Generation // - Semantic Caching -// - Backup Models // - Defaults to merge with the user input fields // - Guardrails +// - Route Type // // NOTE: These settings may only be applied to a route which uses an LLMProvider backend! type RouteSettings struct { @@ -477,11 +535,6 @@ type RouteSettings struct { // namespace: gloo-system // ``` SemanticCache *SemanticCache `protobuf:"bytes,4,opt,name=semantic_cache,json=semanticCache,proto3" json:"semantic_cache,omitempty"` - // Backup models to use in case of a failure with the primary model - // passed in the request. By default each model will be tried 2 times - // before moving on to the next model in the list. If all requests fail then - // the final response will be returned to the client. - BackupModels []string `protobuf:"bytes,5,rep,name=backup_models,json=backupModels,proto3" json:"backup_models,omitempty"` // A list of defaults to be merged with the user input fields. // These will NOT override the user input fields unless override is explicitly set to true. // Some examples include setting the temperature, max_tokens, etc. @@ -502,7 +555,9 @@ type RouteSettings struct { // - field: "max_tokens" // value: 100 // ``` - Defaults []*FieldDefault `protobuf:"bytes,6,rep,name=defaults,proto3" json:"defaults,omitempty"` + Defaults []*FieldDefault `protobuf:"bytes,5,rep,name=defaults,proto3" json:"defaults,omitempty"` + // The type of route this is, currently only CHAT is supported + RouteType RouteSettings_RouteType `protobuf:"varint,6,opt,name=route_type,json=routeType,proto3,enum=ai.options.gloo.solo.io.RouteSettings_RouteType" json:"route_type,omitempty"` } func (x *RouteSettings) Reset() { @@ -565,18 +620,18 @@ func (x *RouteSettings) GetSemanticCache() *SemanticCache { return nil } -func (x *RouteSettings) GetBackupModels() []string { +func (x *RouteSettings) GetDefaults() []*FieldDefault { if x != nil { - return x.BackupModels + return x.Defaults } return nil } -func (x *RouteSettings) GetDefaults() []*FieldDefault { +func (x *RouteSettings) GetRouteType() RouteSettings_RouteType { if x != nil { - return x.Defaults + return x.RouteType } - return nil + return RouteSettings_CHAT } type FieldDefault struct { @@ -1095,7 +1150,7 @@ type UpstreamSpec_CustomHost struct { // Custom host to send the traffic to Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // Custom host to send the traffic to + // Custom port to send the traffic to Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` } @@ -1158,6 +1213,10 @@ type UpstreamSpec_OpenAI struct { AuthToken *SingleAuthToken `protobuf:"bytes,1,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"` // Optional custom host to send the traffic to CustomHost *UpstreamSpec_CustomHost `protobuf:"bytes,2,opt,name=custom_host,json=customHost,proto3" json:"custom_host,omitempty"` + // Optional: override model name. If not set, the model name will be taken from the request + // This can be useful when trying model failover scenarios + // e.g. "gpt-4o-mini" + Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` } func (x *UpstreamSpec_OpenAI) Reset() { @@ -1206,6 +1265,13 @@ func (x *UpstreamSpec_OpenAI) GetCustomHost() *UpstreamSpec_CustomHost { return nil } +func (x *UpstreamSpec_OpenAI) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + // Settings for the Azure OpenAI API type UpstreamSpec_AzureOpenAI struct { state protoimpl.MessageState @@ -1219,10 +1285,17 @@ type UpstreamSpec_AzureOpenAI struct { // // *UpstreamSpec_AzureOpenAI_AuthToken AuthTokenSource isUpstreamSpec_AzureOpenAI_AuthTokenSource `protobuf_oneof:"auth_token_source"` - // (REQUIRED) The endpoint to use + // The endpoint to use // This should be the endpoint to the Azure OpenAI API, e.g. my-endpoint.openai.azure.com // If the scheme is included it will be stripped. + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + // The deployment/model name to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} + DeploymentName string `protobuf:"bytes,3,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` + // The version of the API to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} + ApiVersion string `protobuf:"bytes,4,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` } func (x *UpstreamSpec_AzureOpenAI) Reset() { @@ -1278,6 +1351,20 @@ func (x *UpstreamSpec_AzureOpenAI) GetEndpoint() string { return "" } +func (x *UpstreamSpec_AzureOpenAI) GetDeploymentName() string { + if x != nil { + return x.DeploymentName + } + return "" +} + +func (x *UpstreamSpec_AzureOpenAI) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + type isUpstreamSpec_AzureOpenAI_AuthTokenSource interface { isUpstreamSpec_AzureOpenAI_AuthTokenSource() } @@ -1303,6 +1390,9 @@ type UpstreamSpec_Mistral struct { AuthToken *SingleAuthToken `protobuf:"bytes,1,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"` // Optional custom host to send the traffic to CustomHost *UpstreamSpec_CustomHost `protobuf:"bytes,2,opt,name=custom_host,json=customHost,proto3" json:"custom_host,omitempty"` + // Optional: override model name. If not set, the model name will be taken from the request + // This can be useful when trying model failover scenarios + Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` } func (x *UpstreamSpec_Mistral) Reset() { @@ -1351,6 +1441,13 @@ func (x *UpstreamSpec_Mistral) GetCustomHost() *UpstreamSpec_CustomHost { return nil } +func (x *UpstreamSpec_Mistral) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + type UpstreamSpec_Anthropic struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1364,6 +1461,9 @@ type UpstreamSpec_Anthropic struct { // An optional version header to pass to the Anthropic API // See: https://docs.anthropic.com/en/api/versioning for more details Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + // Optional: override model name. If not set, the model name will be taken from the request + // This can be useful when trying model failover scenarios + Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` } func (x *UpstreamSpec_Anthropic) Reset() { @@ -1419,6 +1519,248 @@ func (x *UpstreamSpec_Anthropic) GetVersion() string { return "" } +func (x *UpstreamSpec_Anthropic) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +// multi: +// pools: +// - pool: +// - openai: +// authToken: +// secretRef: +// name: openai-secret +// namespace: gloo-system +// priority: 1 +// - pool: +// - azureOpenai: +// deploymentName: gpt-4o-mini +// apiVersion: 2024-02-15-preview +// endpoint: ai-gateway.openai.azure.com +// authToken: +// secretRef: +// name: azure-secret +// namespace: gloo-system +// - azureOpenai: +// deploymentName: gpt-4o-mini-2 +// apiVersion: 2024-02-15-preview +// endpoint: ai-gateway.openai.azure.com +// authToken: +// secretRef: +// name: azure-secret +// namespace: gloo-system +// priority: 2 +type UpstreamSpec_MultiPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of prioritized backend pools + Priorities []*UpstreamSpec_MultiPool_Priority `protobuf:"bytes,1,rep,name=priorities,proto3" json:"priorities,omitempty"` +} + +func (x *UpstreamSpec_MultiPool) Reset() { + *x = UpstreamSpec_MultiPool{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamSpec_MultiPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamSpec_MultiPool) ProtoMessage() {} + +func (x *UpstreamSpec_MultiPool) ProtoReflect() protoreflect.Message { + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamSpec_MultiPool.ProtoReflect.Descriptor instead. +func (*UpstreamSpec_MultiPool) Descriptor() ([]byte, []int) { + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_rawDescGZIP(), []int{1, 5} +} + +func (x *UpstreamSpec_MultiPool) GetPriorities() []*UpstreamSpec_MultiPool_Priority { + if x != nil { + return x.Priorities + } + return nil +} + +type UpstreamSpec_MultiPool_Backend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Llm: + // + // *UpstreamSpec_MultiPool_Backend_Openai + // *UpstreamSpec_MultiPool_Backend_Mistral + // *UpstreamSpec_MultiPool_Backend_Anthropic + // *UpstreamSpec_MultiPool_Backend_AzureOpenai + Llm isUpstreamSpec_MultiPool_Backend_Llm `protobuf_oneof:"llm"` +} + +func (x *UpstreamSpec_MultiPool_Backend) Reset() { + *x = UpstreamSpec_MultiPool_Backend{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamSpec_MultiPool_Backend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamSpec_MultiPool_Backend) ProtoMessage() {} + +func (x *UpstreamSpec_MultiPool_Backend) ProtoReflect() protoreflect.Message { + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamSpec_MultiPool_Backend.ProtoReflect.Descriptor instead. +func (*UpstreamSpec_MultiPool_Backend) Descriptor() ([]byte, []int) { + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_rawDescGZIP(), []int{1, 5, 0} +} + +func (m *UpstreamSpec_MultiPool_Backend) GetLlm() isUpstreamSpec_MultiPool_Backend_Llm { + if m != nil { + return m.Llm + } + return nil +} + +func (x *UpstreamSpec_MultiPool_Backend) GetOpenai() *UpstreamSpec_OpenAI { + if x, ok := x.GetLlm().(*UpstreamSpec_MultiPool_Backend_Openai); ok { + return x.Openai + } + return nil +} + +func (x *UpstreamSpec_MultiPool_Backend) GetMistral() *UpstreamSpec_Mistral { + if x, ok := x.GetLlm().(*UpstreamSpec_MultiPool_Backend_Mistral); ok { + return x.Mistral + } + return nil +} + +func (x *UpstreamSpec_MultiPool_Backend) GetAnthropic() *UpstreamSpec_Anthropic { + if x, ok := x.GetLlm().(*UpstreamSpec_MultiPool_Backend_Anthropic); ok { + return x.Anthropic + } + return nil +} + +func (x *UpstreamSpec_MultiPool_Backend) GetAzureOpenai() *UpstreamSpec_AzureOpenAI { + if x, ok := x.GetLlm().(*UpstreamSpec_MultiPool_Backend_AzureOpenai); ok { + return x.AzureOpenai + } + return nil +} + +type isUpstreamSpec_MultiPool_Backend_Llm interface { + isUpstreamSpec_MultiPool_Backend_Llm() +} + +type UpstreamSpec_MultiPool_Backend_Openai struct { + // OpenAI upstream + Openai *UpstreamSpec_OpenAI `protobuf:"bytes,1,opt,name=openai,proto3,oneof"` +} + +type UpstreamSpec_MultiPool_Backend_Mistral struct { + // Mistral upstream + Mistral *UpstreamSpec_Mistral `protobuf:"bytes,2,opt,name=mistral,proto3,oneof"` +} + +type UpstreamSpec_MultiPool_Backend_Anthropic struct { + // Anthropic upstream + Anthropic *UpstreamSpec_Anthropic `protobuf:"bytes,3,opt,name=anthropic,proto3,oneof"` +} + +type UpstreamSpec_MultiPool_Backend_AzureOpenai struct { + // Azure OpenAI upstream + AzureOpenai *UpstreamSpec_AzureOpenAI `protobuf:"bytes,4,opt,name=azure_openai,json=azureOpenai,proto3,oneof"` +} + +func (*UpstreamSpec_MultiPool_Backend_Openai) isUpstreamSpec_MultiPool_Backend_Llm() {} + +func (*UpstreamSpec_MultiPool_Backend_Mistral) isUpstreamSpec_MultiPool_Backend_Llm() {} + +func (*UpstreamSpec_MultiPool_Backend_Anthropic) isUpstreamSpec_MultiPool_Backend_Llm() {} + +func (*UpstreamSpec_MultiPool_Backend_AzureOpenai) isUpstreamSpec_MultiPool_Backend_Llm() {} + +type UpstreamSpec_MultiPool_Priority struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pool []*UpstreamSpec_MultiPool_Backend `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"` +} + +func (x *UpstreamSpec_MultiPool_Priority) Reset() { + *x = UpstreamSpec_MultiPool_Priority{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamSpec_MultiPool_Priority) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamSpec_MultiPool_Priority) ProtoMessage() {} + +func (x *UpstreamSpec_MultiPool_Priority) ProtoReflect() protoreflect.Message { + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamSpec_MultiPool_Priority.ProtoReflect.Descriptor instead. +func (*UpstreamSpec_MultiPool_Priority) Descriptor() ([]byte, []int) { + return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_rawDescGZIP(), []int{1, 5, 1} +} + +func (x *UpstreamSpec_MultiPool_Priority) GetPool() []*UpstreamSpec_MultiPool_Backend { + if x != nil { + return x.Pool + } + return nil +} + type Embedding_OpenAI struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1433,7 +1775,7 @@ type Embedding_OpenAI struct { func (x *Embedding_OpenAI) Reset() { *x = Embedding_OpenAI{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[16] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1446,7 +1788,7 @@ func (x *Embedding_OpenAI) String() string { func (*Embedding_OpenAI) ProtoMessage() {} func (x *Embedding_OpenAI) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[16] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1495,20 +1837,23 @@ type Embedding_AzureOpenAI struct { // // *Embedding_AzureOpenAI_AuthToken AuthTokenSource isEmbedding_AzureOpenAI_AuthTokenSource `protobuf_oneof:"auth_token_source"` - // (REQUIRED) The version of the API to use + // The version of the API to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} ApiVersion string `protobuf:"bytes,2,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` - // (REQUIRED) The endpoint to use + // The endpoint to use // This should be the endpoint to the Azure OpenAI API, e.g. https://my-endpoint.openai.azure.com // If the scheme isn't included it will be added. + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - // (REQUIRED) The deployment/model name to use + // The deployment/model name to use + // This value can be found https://{endpoint}/openai/deployments/{deployment_name}/chat/completions?api-version={api_version} DeploymentName string `protobuf:"bytes,4,opt,name=deployment_name,json=deploymentName,proto3" json:"deployment_name,omitempty"` } func (x *Embedding_AzureOpenAI) Reset() { *x = Embedding_AzureOpenAI{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1866,7 @@ func (x *Embedding_AzureOpenAI) String() string { func (*Embedding_AzureOpenAI) ProtoMessage() {} func (x *Embedding_AzureOpenAI) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1603,7 +1948,7 @@ type SemanticCache_Redis struct { func (x *SemanticCache_Redis) Reset() { *x = SemanticCache_Redis{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[18] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1616,7 +1961,7 @@ func (x *SemanticCache_Redis) String() string { func (*SemanticCache_Redis) ProtoMessage() {} func (x *SemanticCache_Redis) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[18] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1666,7 +2011,7 @@ type SemanticCache_Weaviate struct { func (x *SemanticCache_Weaviate) Reset() { *x = SemanticCache_Weaviate{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[19] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1679,7 +2024,7 @@ func (x *SemanticCache_Weaviate) String() string { func (*SemanticCache_Weaviate) ProtoMessage() {} func (x *SemanticCache_Weaviate) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[19] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1739,7 +2084,7 @@ type SemanticCache_DataStore struct { func (x *SemanticCache_DataStore) Reset() { *x = SemanticCache_DataStore{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1752,7 +2097,7 @@ func (x *SemanticCache_DataStore) String() string { func (*SemanticCache_DataStore) ProtoMessage() {} func (x *SemanticCache_DataStore) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1819,7 +2164,7 @@ type RAG_DataStore struct { func (x *RAG_DataStore) Reset() { *x = RAG_DataStore{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[21] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1832,7 +2177,7 @@ func (x *RAG_DataStore) String() string { func (*RAG_DataStore) ProtoMessage() {} func (x *RAG_DataStore) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[21] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1888,7 +2233,7 @@ type AIPromptEnrichment_Message struct { func (x *AIPromptEnrichment_Message) Reset() { *x = AIPromptEnrichment_Message{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[22] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1901,7 +2246,7 @@ func (x *AIPromptEnrichment_Message) String() string { func (*AIPromptEnrichment_Message) ProtoMessage() {} func (x *AIPromptEnrichment_Message) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[22] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1949,7 +2294,7 @@ type AIPromptGaurd_Request struct { func (x *AIPromptGaurd_Request) Reset() { *x = AIPromptGaurd_Request{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[23] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1962,7 +2307,7 @@ func (x *AIPromptGaurd_Request) String() string { func (*AIPromptGaurd_Request) ProtoMessage() {} func (x *AIPromptGaurd_Request) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[23] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2009,7 +2354,7 @@ type AIPromptGaurd_Response struct { func (x *AIPromptGaurd_Response) Reset() { *x = AIPromptGaurd_Response{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[24] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2022,7 +2367,7 @@ func (x *AIPromptGaurd_Response) String() string { func (*AIPromptGaurd_Response) ProtoMessage() {} func (x *AIPromptGaurd_Response) ProtoReflect() protoreflect.Message { - mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[24] + mi := &file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2081,7 +2426,7 @@ var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_p 0x2e, 0x69, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0xa6, 0x08, 0x0a, 0x0c, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, + 0x65, 0x22, 0x8b, 0x0e, 0x0a, 0x0c, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, 0x46, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, @@ -2101,236 +2446,286 @@ var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_p 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x48, - 0x00, 0x52, 0x0b, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x1a, 0x34, - 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xa4, 0x01, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x12, - 0x47, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x00, 0x52, 0x0b, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x12, 0x47, + 0x0a, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x52, - 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x1a, 0x89, 0x01, 0x0a, 0x0b, - 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x12, 0x49, 0x0a, 0x0a, 0x61, - 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, - 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xa5, 0x01, 0x0a, 0x07, 0x4d, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x6c, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, - 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x0b, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, - 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, - 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x1a, - 0xc1, 0x01, 0x0a, 0x09, 0x41, 0x6e, 0x74, 0x68, 0x72, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x47, 0x0a, - 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, - 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, - 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, - 0x65, 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x42, 0x05, 0x0a, 0x03, 0x6c, 0x6c, 0x6d, 0x22, 0x9b, 0x03, 0x0a, 0x0d, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x58, 0x0a, 0x11, - 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, - 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, 0x6e, 0x72, 0x69, - 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, - 0x5f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, + 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x50, 0x6f, 0x6f, 0x6c, 0x48, 0x00, + 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x1a, 0x34, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xba, 0x01, + 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, - 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, - 0x61, 0x75, 0x72, 0x64, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x12, 0x2e, 0x0a, 0x03, 0x72, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x41, 0x75, 0x74, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x51, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, + 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x48, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xd3, 0x01, 0x0a, 0x0b, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, - 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x52, 0x41, 0x47, 0x52, 0x03, 0x72, 0x61, - 0x67, 0x12, 0x4d, 0x0a, 0x0e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x69, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, - 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x52, 0x0d, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, - 0x6f, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x6e, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2c, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x60, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf2, 0x03, 0x0a, 0x09, 0x45, - 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, - 0x69, 0x6f, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x41, 0x49, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x12, 0x53, 0x0a, - 0x0c, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, 0x6d, - 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, - 0x6e, 0x41, 0x49, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, - 0x61, 0x69, 0x1a, 0x68, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x12, 0x49, 0x0a, 0x0a, + 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x41, + 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, + 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x61, + 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x1a, 0xbb, 0x01, 0x0a, 0x07, 0x4d, 0x69, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xd3, 0x01, 0x0a, - 0x0b, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x12, 0x49, 0x0a, 0x0a, + 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, + 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, + 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0xd7, + 0x01, 0x0a, 0x09, 0x41, 0x6e, 0x74, 0x68, 0x72, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, - 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x13, 0x0a, - 0x11, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x22, - 0xa0, 0x05, 0x0a, 0x0d, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, - 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, - 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x3f, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, - 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0x5d, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, - 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, - 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x74, 0x0a, 0x08, 0x57, 0x65, 0x61, 0x76, 0x69, 0x61, 0x74, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x50, 0x6f, - 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x67, 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x1a, 0xad, 0x01, 0x0a, 0x09, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x72, 0x65, 0x64, - 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, - 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, - 0x4d, 0x0a, 0x08, 0x77, 0x65, 0x61, 0x76, 0x69, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, - 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x57, 0x65, 0x61, 0x76, 0x69, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x77, 0x65, 0x61, 0x76, 0x69, 0x61, 0x74, 0x65, 0x42, 0x0b, - 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x25, 0x0a, 0x04, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, - 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, - 0x10, 0x01, 0x22, 0x91, 0x02, 0x0a, 0x03, 0x52, 0x41, 0x47, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x61, - 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, - 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x52, 0x41, 0x47, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, 0x6d, - 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, - 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x6f, - 0x6d, 0x70, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x59, 0x0a, 0x09, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x69, 0x2e, + 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, - 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, - 0x08, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x64, 0x61, 0x74, - 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x3c, 0x0a, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x22, 0xe9, 0x01, 0x0a, 0x12, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, - 0x74, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x07, 0x70, - 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, + 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, + 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0x8d, 0x04, 0x0a, 0x09, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x58, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x61, 0x69, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, + 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, + 0x63, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x50, 0x6f, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x1a, 0xcc, 0x02, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x06, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, + 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, + 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, + 0x70, 0x65, 0x63, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x69, 0x12, 0x49, 0x0a, 0x07, 0x6d, 0x69, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, + 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x69, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x12, + 0x4f, 0x0a, 0x09, 0x61, 0x6e, 0x74, 0x68, 0x72, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x6e, 0x74, 0x68, 0x72, 0x6f, + 0x70, 0x69, 0x63, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6e, 0x74, 0x68, 0x72, 0x6f, 0x70, 0x69, 0x63, + 0x12, 0x56, 0x0a, 0x0c, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x69, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, + 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x7a, + 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x7a, 0x75, + 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x42, 0x05, 0x0a, 0x03, 0x6c, 0x6c, 0x6d, 0x1a, + 0x57, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x4b, 0x0a, 0x04, 0x70, + 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x61, 0x69, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, + 0x2e, 0x69, 0x6f, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x65, 0x63, + 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x50, 0x6f, 0x6f, 0x6c, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x6c, 0x6c, 0x6d, 0x22, + 0xde, 0x03, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x58, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x72, 0x69, + 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, - 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x07, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x4b, 0x0a, 0x06, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, 0x69, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, - 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, 0x6e, 0x72, - 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x1a, 0x37, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x22, 0xc1, 0x03, 0x0a, 0x0d, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, 0x75, - 0x72, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, - 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x6d, 0x70, + 0x74, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x70, + 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, + 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, + 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x70, + 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x12, 0x2e, 0x0a, 0x03, 0x72, 0x61, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x52, 0x41, + 0x47, 0x52, 0x03, 0x72, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x0e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, + 0x69, 0x63, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, - 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, - 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x5b, 0x0a, 0x07, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x36, - 0x0a, 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0xbb, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x53, 0x0a, - 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x37, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, - 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, - 0x70, 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x49, 0x6e, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, - 0x6e, 0x73, 0x22, 0x40, 0x0a, 0x07, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x49, 0x6e, 0x12, 0x07, 0x0a, - 0x03, 0x53, 0x53, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, - 0x5f, 0x43, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, 0x4c, - 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x5f, 0x4e, 0x55, 0x4d, 0x42, - 0x45, 0x52, 0x10, 0x03, 0x42, 0x54, 0xb8, 0xf5, 0x04, 0x01, 0xc0, 0xf5, 0x04, 0x01, 0xd0, 0xf5, - 0x04, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, - 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x6c, 0x6f, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x2f, 0x67, 0x6c, 0x6f, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x2f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x0d, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, + 0x6f, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x61, + 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, + 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x15, 0x0a, 0x09, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x48, 0x41, 0x54, 0x10, 0x00, + 0x22, 0x6e, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x22, 0x60, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0xf2, 0x03, 0x0a, 0x09, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x12, 0x43, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, + 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x48, 0x00, 0x52, 0x06, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x69, 0x12, 0x53, 0x0a, 0x0c, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x69, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, + 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x49, 0x48, 0x00, 0x52, 0x0b, 0x61, + 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x69, 0x1a, 0x68, 0x0a, 0x06, 0x4f, 0x70, + 0x65, 0x6e, 0x41, 0x49, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, + 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, + 0x13, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x1a, 0xd3, 0x01, 0x0a, 0x0b, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, + 0x65, 0x6e, 0x41, 0x49, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, + 0x69, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x65, 0x6d, + 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xa0, 0x05, 0x0a, 0x0d, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, + 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, + 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x09, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6d, 0x62, + 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, + 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, + 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, + 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x3f, 0x0a, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x61, 0x69, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, + 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0x5d, + 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x73, + 0x63, 0x6f, 0x72, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x1a, 0x74, 0x0a, + 0x08, 0x57, 0x65, 0x61, 0x76, 0x69, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x67, + 0x72, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x65, 0x1a, 0xad, 0x01, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x12, 0x44, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, + 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x00, + 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x77, 0x65, 0x61, 0x76, 0x69, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x69, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, + 0x2e, 0x69, 0x6f, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x2e, 0x57, 0x65, 0x61, 0x76, 0x69, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x77, 0x65, + 0x61, 0x76, 0x69, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x22, 0x25, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x52, + 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, + 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x22, 0x91, 0x02, 0x0a, 0x03, 0x52, + 0x41, 0x47, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, + 0x52, 0x41, 0x47, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x09, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6d, 0x62, 0x65, + 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x69, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, + 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, + 0x09, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, + 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x1a, 0x59, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x3c, + 0x0a, 0x0c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, + 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xe9, 0x01, 0x0a, + 0x12, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, + 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x72, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x12, 0x4b, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, + 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x1a, + 0x37, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xc1, 0x03, 0x0a, 0x0d, 0x41, 0x49, 0x50, + 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x69, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, + 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, + 0x75, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, + 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x5b, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0xbb, + 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x61, 0x69, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, + 0x6f, 0x2e, 0x41, 0x49, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x47, 0x61, 0x75, 0x72, 0x64, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x49, 0x6e, + 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x73, 0x22, 0x40, 0x0a, 0x07, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x49, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x4e, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x5f, 0x43, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x48, + 0x4f, 0x4e, 0x45, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x42, 0x54, 0xb8, 0xf5, + 0x04, 0x01, 0xc0, 0xf5, 0x04, 0x01, 0xd0, 0xf5, 0x04, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x67, + 0x6c, 0x6f, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x67, 0x6c, 0x6f, + 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2345,80 +2740,92 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ return file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_rawDescData } -var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_goTypes = []any{ - (SemanticCache_Mode)(0), // 0: ai.options.gloo.solo.io.SemanticCache.Mode - (AIPromptGaurd_Response_BuiltIn)(0), // 1: ai.options.gloo.solo.io.AIPromptGaurd.Response.BuiltIn - (*SingleAuthToken)(nil), // 2: ai.options.gloo.solo.io.SingleAuthToken - (*UpstreamSpec)(nil), // 3: ai.options.gloo.solo.io.UpstreamSpec - (*RouteSettings)(nil), // 4: ai.options.gloo.solo.io.RouteSettings - (*FieldDefault)(nil), // 5: ai.options.gloo.solo.io.FieldDefault - (*Postgres)(nil), // 6: ai.options.gloo.solo.io.Postgres - (*Embedding)(nil), // 7: ai.options.gloo.solo.io.Embedding - (*SemanticCache)(nil), // 8: ai.options.gloo.solo.io.SemanticCache - (*RAG)(nil), // 9: ai.options.gloo.solo.io.RAG - (*RateLimiting)(nil), // 10: ai.options.gloo.solo.io.RateLimiting - (*AIPromptEnrichment)(nil), // 11: ai.options.gloo.solo.io.AIPromptEnrichment - (*AIPromptGaurd)(nil), // 12: ai.options.gloo.solo.io.AIPromptGaurd - (*UpstreamSpec_CustomHost)(nil), // 13: ai.options.gloo.solo.io.UpstreamSpec.CustomHost - (*UpstreamSpec_OpenAI)(nil), // 14: ai.options.gloo.solo.io.UpstreamSpec.OpenAI - (*UpstreamSpec_AzureOpenAI)(nil), // 15: ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI - (*UpstreamSpec_Mistral)(nil), // 16: ai.options.gloo.solo.io.UpstreamSpec.Mistral - (*UpstreamSpec_Anthropic)(nil), // 17: ai.options.gloo.solo.io.UpstreamSpec.Anthropic - (*Embedding_OpenAI)(nil), // 18: ai.options.gloo.solo.io.Embedding.OpenAI - (*Embedding_AzureOpenAI)(nil), // 19: ai.options.gloo.solo.io.Embedding.AzureOpenAI - (*SemanticCache_Redis)(nil), // 20: ai.options.gloo.solo.io.SemanticCache.Redis - (*SemanticCache_Weaviate)(nil), // 21: ai.options.gloo.solo.io.SemanticCache.Weaviate - (*SemanticCache_DataStore)(nil), // 22: ai.options.gloo.solo.io.SemanticCache.DataStore - (*RAG_DataStore)(nil), // 23: ai.options.gloo.solo.io.RAG.DataStore - (*AIPromptEnrichment_Message)(nil), // 24: ai.options.gloo.solo.io.AIPromptEnrichment.Message - (*AIPromptGaurd_Request)(nil), // 25: ai.options.gloo.solo.io.AIPromptGaurd.Request - (*AIPromptGaurd_Response)(nil), // 26: ai.options.gloo.solo.io.AIPromptGaurd.Response - (*core.ResourceRef)(nil), // 27: core.solo.io.ResourceRef - (*structpb.Value)(nil), // 28: google.protobuf.Value + (RouteSettings_RouteType)(0), // 0: ai.options.gloo.solo.io.RouteSettings.RouteType + (SemanticCache_Mode)(0), // 1: ai.options.gloo.solo.io.SemanticCache.Mode + (AIPromptGaurd_Response_BuiltIn)(0), // 2: ai.options.gloo.solo.io.AIPromptGaurd.Response.BuiltIn + (*SingleAuthToken)(nil), // 3: ai.options.gloo.solo.io.SingleAuthToken + (*UpstreamSpec)(nil), // 4: ai.options.gloo.solo.io.UpstreamSpec + (*RouteSettings)(nil), // 5: ai.options.gloo.solo.io.RouteSettings + (*FieldDefault)(nil), // 6: ai.options.gloo.solo.io.FieldDefault + (*Postgres)(nil), // 7: ai.options.gloo.solo.io.Postgres + (*Embedding)(nil), // 8: ai.options.gloo.solo.io.Embedding + (*SemanticCache)(nil), // 9: ai.options.gloo.solo.io.SemanticCache + (*RAG)(nil), // 10: ai.options.gloo.solo.io.RAG + (*RateLimiting)(nil), // 11: ai.options.gloo.solo.io.RateLimiting + (*AIPromptEnrichment)(nil), // 12: ai.options.gloo.solo.io.AIPromptEnrichment + (*AIPromptGaurd)(nil), // 13: ai.options.gloo.solo.io.AIPromptGaurd + (*UpstreamSpec_CustomHost)(nil), // 14: ai.options.gloo.solo.io.UpstreamSpec.CustomHost + (*UpstreamSpec_OpenAI)(nil), // 15: ai.options.gloo.solo.io.UpstreamSpec.OpenAI + (*UpstreamSpec_AzureOpenAI)(nil), // 16: ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI + (*UpstreamSpec_Mistral)(nil), // 17: ai.options.gloo.solo.io.UpstreamSpec.Mistral + (*UpstreamSpec_Anthropic)(nil), // 18: ai.options.gloo.solo.io.UpstreamSpec.Anthropic + (*UpstreamSpec_MultiPool)(nil), // 19: ai.options.gloo.solo.io.UpstreamSpec.MultiPool + (*UpstreamSpec_MultiPool_Backend)(nil), // 20: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend + (*UpstreamSpec_MultiPool_Priority)(nil), // 21: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Priority + (*Embedding_OpenAI)(nil), // 22: ai.options.gloo.solo.io.Embedding.OpenAI + (*Embedding_AzureOpenAI)(nil), // 23: ai.options.gloo.solo.io.Embedding.AzureOpenAI + (*SemanticCache_Redis)(nil), // 24: ai.options.gloo.solo.io.SemanticCache.Redis + (*SemanticCache_Weaviate)(nil), // 25: ai.options.gloo.solo.io.SemanticCache.Weaviate + (*SemanticCache_DataStore)(nil), // 26: ai.options.gloo.solo.io.SemanticCache.DataStore + (*RAG_DataStore)(nil), // 27: ai.options.gloo.solo.io.RAG.DataStore + (*AIPromptEnrichment_Message)(nil), // 28: ai.options.gloo.solo.io.AIPromptEnrichment.Message + (*AIPromptGaurd_Request)(nil), // 29: ai.options.gloo.solo.io.AIPromptGaurd.Request + (*AIPromptGaurd_Response)(nil), // 30: ai.options.gloo.solo.io.AIPromptGaurd.Response + (*core.ResourceRef)(nil), // 31: core.solo.io.ResourceRef + (*structpb.Value)(nil), // 32: google.protobuf.Value } var file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_depIdxs = []int32{ - 27, // 0: ai.options.gloo.solo.io.SingleAuthToken.secret_ref:type_name -> core.solo.io.ResourceRef - 14, // 1: ai.options.gloo.solo.io.UpstreamSpec.openai:type_name -> ai.options.gloo.solo.io.UpstreamSpec.OpenAI - 16, // 2: ai.options.gloo.solo.io.UpstreamSpec.mistral:type_name -> ai.options.gloo.solo.io.UpstreamSpec.Mistral - 17, // 3: ai.options.gloo.solo.io.UpstreamSpec.anthropic:type_name -> ai.options.gloo.solo.io.UpstreamSpec.Anthropic - 15, // 4: ai.options.gloo.solo.io.UpstreamSpec.azure_openai:type_name -> ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI - 11, // 5: ai.options.gloo.solo.io.RouteSettings.prompt_enrichment:type_name -> ai.options.gloo.solo.io.AIPromptEnrichment - 12, // 6: ai.options.gloo.solo.io.RouteSettings.prompt_guard:type_name -> ai.options.gloo.solo.io.AIPromptGaurd - 9, // 7: ai.options.gloo.solo.io.RouteSettings.rag:type_name -> ai.options.gloo.solo.io.RAG - 8, // 8: ai.options.gloo.solo.io.RouteSettings.semantic_cache:type_name -> ai.options.gloo.solo.io.SemanticCache - 5, // 9: ai.options.gloo.solo.io.RouteSettings.defaults:type_name -> ai.options.gloo.solo.io.FieldDefault - 28, // 10: ai.options.gloo.solo.io.FieldDefault.value:type_name -> google.protobuf.Value - 18, // 11: ai.options.gloo.solo.io.Embedding.openai:type_name -> ai.options.gloo.solo.io.Embedding.OpenAI - 19, // 12: ai.options.gloo.solo.io.Embedding.azure_openai:type_name -> ai.options.gloo.solo.io.Embedding.AzureOpenAI - 22, // 13: ai.options.gloo.solo.io.SemanticCache.datastore:type_name -> ai.options.gloo.solo.io.SemanticCache.DataStore - 7, // 14: ai.options.gloo.solo.io.SemanticCache.embedding:type_name -> ai.options.gloo.solo.io.Embedding - 0, // 15: ai.options.gloo.solo.io.SemanticCache.mode:type_name -> ai.options.gloo.solo.io.SemanticCache.Mode - 23, // 16: ai.options.gloo.solo.io.RAG.datastore:type_name -> ai.options.gloo.solo.io.RAG.DataStore - 7, // 17: ai.options.gloo.solo.io.RAG.embedding:type_name -> ai.options.gloo.solo.io.Embedding - 24, // 18: ai.options.gloo.solo.io.AIPromptEnrichment.prepend:type_name -> ai.options.gloo.solo.io.AIPromptEnrichment.Message - 24, // 19: ai.options.gloo.solo.io.AIPromptEnrichment.append:type_name -> ai.options.gloo.solo.io.AIPromptEnrichment.Message - 25, // 20: ai.options.gloo.solo.io.AIPromptGaurd.request:type_name -> ai.options.gloo.solo.io.AIPromptGaurd.Request - 26, // 21: ai.options.gloo.solo.io.AIPromptGaurd.response:type_name -> ai.options.gloo.solo.io.AIPromptGaurd.Response - 2, // 22: ai.options.gloo.solo.io.UpstreamSpec.OpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken - 13, // 23: ai.options.gloo.solo.io.UpstreamSpec.OpenAI.custom_host:type_name -> ai.options.gloo.solo.io.UpstreamSpec.CustomHost - 2, // 24: ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken - 2, // 25: ai.options.gloo.solo.io.UpstreamSpec.Mistral.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken - 13, // 26: ai.options.gloo.solo.io.UpstreamSpec.Mistral.custom_host:type_name -> ai.options.gloo.solo.io.UpstreamSpec.CustomHost - 2, // 27: ai.options.gloo.solo.io.UpstreamSpec.Anthropic.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken - 13, // 28: ai.options.gloo.solo.io.UpstreamSpec.Anthropic.custom_host:type_name -> ai.options.gloo.solo.io.UpstreamSpec.CustomHost - 2, // 29: ai.options.gloo.solo.io.Embedding.OpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken - 2, // 30: ai.options.gloo.solo.io.Embedding.AzureOpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken - 20, // 31: ai.options.gloo.solo.io.SemanticCache.DataStore.redis:type_name -> ai.options.gloo.solo.io.SemanticCache.Redis - 21, // 32: ai.options.gloo.solo.io.SemanticCache.DataStore.weaviate:type_name -> ai.options.gloo.solo.io.SemanticCache.Weaviate - 6, // 33: ai.options.gloo.solo.io.RAG.DataStore.postgres:type_name -> ai.options.gloo.solo.io.Postgres - 1, // 34: ai.options.gloo.solo.io.AIPromptGaurd.Response.builtins:type_name -> ai.options.gloo.solo.io.AIPromptGaurd.Response.BuiltIn - 35, // [35:35] is the sub-list for method output_type - 35, // [35:35] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name + 31, // 0: ai.options.gloo.solo.io.SingleAuthToken.secret_ref:type_name -> core.solo.io.ResourceRef + 15, // 1: ai.options.gloo.solo.io.UpstreamSpec.openai:type_name -> ai.options.gloo.solo.io.UpstreamSpec.OpenAI + 17, // 2: ai.options.gloo.solo.io.UpstreamSpec.mistral:type_name -> ai.options.gloo.solo.io.UpstreamSpec.Mistral + 18, // 3: ai.options.gloo.solo.io.UpstreamSpec.anthropic:type_name -> ai.options.gloo.solo.io.UpstreamSpec.Anthropic + 16, // 4: ai.options.gloo.solo.io.UpstreamSpec.azure_openai:type_name -> ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI + 19, // 5: ai.options.gloo.solo.io.UpstreamSpec.multi:type_name -> ai.options.gloo.solo.io.UpstreamSpec.MultiPool + 12, // 6: ai.options.gloo.solo.io.RouteSettings.prompt_enrichment:type_name -> ai.options.gloo.solo.io.AIPromptEnrichment + 13, // 7: ai.options.gloo.solo.io.RouteSettings.prompt_guard:type_name -> ai.options.gloo.solo.io.AIPromptGaurd + 10, // 8: ai.options.gloo.solo.io.RouteSettings.rag:type_name -> ai.options.gloo.solo.io.RAG + 9, // 9: ai.options.gloo.solo.io.RouteSettings.semantic_cache:type_name -> ai.options.gloo.solo.io.SemanticCache + 6, // 10: ai.options.gloo.solo.io.RouteSettings.defaults:type_name -> ai.options.gloo.solo.io.FieldDefault + 0, // 11: ai.options.gloo.solo.io.RouteSettings.route_type:type_name -> ai.options.gloo.solo.io.RouteSettings.RouteType + 32, // 12: ai.options.gloo.solo.io.FieldDefault.value:type_name -> google.protobuf.Value + 22, // 13: ai.options.gloo.solo.io.Embedding.openai:type_name -> ai.options.gloo.solo.io.Embedding.OpenAI + 23, // 14: ai.options.gloo.solo.io.Embedding.azure_openai:type_name -> ai.options.gloo.solo.io.Embedding.AzureOpenAI + 26, // 15: ai.options.gloo.solo.io.SemanticCache.datastore:type_name -> ai.options.gloo.solo.io.SemanticCache.DataStore + 8, // 16: ai.options.gloo.solo.io.SemanticCache.embedding:type_name -> ai.options.gloo.solo.io.Embedding + 1, // 17: ai.options.gloo.solo.io.SemanticCache.mode:type_name -> ai.options.gloo.solo.io.SemanticCache.Mode + 27, // 18: ai.options.gloo.solo.io.RAG.datastore:type_name -> ai.options.gloo.solo.io.RAG.DataStore + 8, // 19: ai.options.gloo.solo.io.RAG.embedding:type_name -> ai.options.gloo.solo.io.Embedding + 28, // 20: ai.options.gloo.solo.io.AIPromptEnrichment.prepend:type_name -> ai.options.gloo.solo.io.AIPromptEnrichment.Message + 28, // 21: ai.options.gloo.solo.io.AIPromptEnrichment.append:type_name -> ai.options.gloo.solo.io.AIPromptEnrichment.Message + 29, // 22: ai.options.gloo.solo.io.AIPromptGaurd.request:type_name -> ai.options.gloo.solo.io.AIPromptGaurd.Request + 30, // 23: ai.options.gloo.solo.io.AIPromptGaurd.response:type_name -> ai.options.gloo.solo.io.AIPromptGaurd.Response + 3, // 24: ai.options.gloo.solo.io.UpstreamSpec.OpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken + 14, // 25: ai.options.gloo.solo.io.UpstreamSpec.OpenAI.custom_host:type_name -> ai.options.gloo.solo.io.UpstreamSpec.CustomHost + 3, // 26: ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken + 3, // 27: ai.options.gloo.solo.io.UpstreamSpec.Mistral.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken + 14, // 28: ai.options.gloo.solo.io.UpstreamSpec.Mistral.custom_host:type_name -> ai.options.gloo.solo.io.UpstreamSpec.CustomHost + 3, // 29: ai.options.gloo.solo.io.UpstreamSpec.Anthropic.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken + 14, // 30: ai.options.gloo.solo.io.UpstreamSpec.Anthropic.custom_host:type_name -> ai.options.gloo.solo.io.UpstreamSpec.CustomHost + 21, // 31: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.priorities:type_name -> ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Priority + 15, // 32: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend.openai:type_name -> ai.options.gloo.solo.io.UpstreamSpec.OpenAI + 17, // 33: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend.mistral:type_name -> ai.options.gloo.solo.io.UpstreamSpec.Mistral + 18, // 34: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend.anthropic:type_name -> ai.options.gloo.solo.io.UpstreamSpec.Anthropic + 16, // 35: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend.azure_openai:type_name -> ai.options.gloo.solo.io.UpstreamSpec.AzureOpenAI + 20, // 36: ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Priority.pool:type_name -> ai.options.gloo.solo.io.UpstreamSpec.MultiPool.Backend + 3, // 37: ai.options.gloo.solo.io.Embedding.OpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken + 3, // 38: ai.options.gloo.solo.io.Embedding.AzureOpenAI.auth_token:type_name -> ai.options.gloo.solo.io.SingleAuthToken + 24, // 39: ai.options.gloo.solo.io.SemanticCache.DataStore.redis:type_name -> ai.options.gloo.solo.io.SemanticCache.Redis + 25, // 40: ai.options.gloo.solo.io.SemanticCache.DataStore.weaviate:type_name -> ai.options.gloo.solo.io.SemanticCache.Weaviate + 7, // 41: ai.options.gloo.solo.io.RAG.DataStore.postgres:type_name -> ai.options.gloo.solo.io.Postgres + 2, // 42: ai.options.gloo.solo.io.AIPromptGaurd.Response.builtins:type_name -> ai.options.gloo.solo.io.AIPromptGaurd.Response.BuiltIn + 43, // [43:43] is the sub-list for method output_type + 43, // [43:43] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name } func init() { file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_init() } @@ -2620,7 +3027,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Embedding_OpenAI); i { + switch v := v.(*UpstreamSpec_MultiPool); i { case 0: return &v.state case 1: @@ -2632,7 +3039,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Embedding_AzureOpenAI); i { + switch v := v.(*UpstreamSpec_MultiPool_Backend); i { case 0: return &v.state case 1: @@ -2644,7 +3051,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SemanticCache_Redis); i { + switch v := v.(*UpstreamSpec_MultiPool_Priority); i { case 0: return &v.state case 1: @@ -2656,7 +3063,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SemanticCache_Weaviate); i { + switch v := v.(*Embedding_OpenAI); i { case 0: return &v.state case 1: @@ -2668,7 +3075,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SemanticCache_DataStore); i { + switch v := v.(*Embedding_AzureOpenAI); i { case 0: return &v.state case 1: @@ -2680,7 +3087,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RAG_DataStore); i { + switch v := v.(*SemanticCache_Redis); i { case 0: return &v.state case 1: @@ -2692,7 +3099,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AIPromptEnrichment_Message); i { + switch v := v.(*SemanticCache_Weaviate); i { case 0: return &v.state case 1: @@ -2704,7 +3111,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AIPromptGaurd_Request); i { + switch v := v.(*SemanticCache_DataStore); i { case 0: return &v.state case 1: @@ -2716,6 +3123,42 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ } } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*RAG_DataStore); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*AIPromptEnrichment_Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*AIPromptGaurd_Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*AIPromptGaurd_Response); i { case 0: return &v.state @@ -2737,6 +3180,7 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ (*UpstreamSpec_Mistral_)(nil), (*UpstreamSpec_Anthropic_)(nil), (*UpstreamSpec_AzureOpenai)(nil), + (*UpstreamSpec_Multi)(nil), } file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[5].OneofWrappers = []any{ (*Embedding_Openai)(nil), @@ -2745,17 +3189,23 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[13].OneofWrappers = []any{ (*UpstreamSpec_AzureOpenAI_AuthToken)(nil), } - file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[16].OneofWrappers = []any{ + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17].OneofWrappers = []any{ + (*UpstreamSpec_MultiPool_Backend_Openai)(nil), + (*UpstreamSpec_MultiPool_Backend_Mistral)(nil), + (*UpstreamSpec_MultiPool_Backend_Anthropic)(nil), + (*UpstreamSpec_MultiPool_Backend_AzureOpenai)(nil), + } + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[19].OneofWrappers = []any{ (*Embedding_OpenAI_AuthToken)(nil), } - file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[17].OneofWrappers = []any{ + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20].OneofWrappers = []any{ (*Embedding_AzureOpenAI_AuthToken)(nil), } - file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[20].OneofWrappers = []any{ + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[23].OneofWrappers = []any{ (*SemanticCache_DataStore_Redis)(nil), (*SemanticCache_DataStore_Weaviate)(nil), } - file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[21].OneofWrappers = []any{ + file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_msgTypes[24].OneofWrappers = []any{ (*RAG_DataStore_Postgres)(nil), } type x struct{} @@ -2763,8 +3213,8 @@ func file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ai_ai_proto_rawDesc, - NumEnums: 2, - NumMessages: 25, + NumEnums: 3, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, diff --git a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.hash.go b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.hash.go index 7a003c035c6..e4bb7151722 100644 --- a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.hash.go +++ b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.hash.go @@ -184,6 +184,28 @@ func (m *UpstreamSpec) Hash(hasher hash.Hash64) (uint64, error) { } } + case *UpstreamSpec_Multi: + + if h, ok := interface{}(m.GetMulti()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Multi")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetMulti(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Multi")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + } return hasher.Sum64(), nil @@ -286,14 +308,6 @@ func (m *RouteSettings) Hash(hasher hash.Hash64) (uint64, error) { } } - for _, v := range m.GetBackupModels() { - - if _, err = hasher.Write([]byte(v)); err != nil { - return 0, err - } - - } - for _, v := range m.GetDefaults() { if h, ok := interface{}(v).(safe_hasher.SafeHasher); ok { @@ -318,6 +332,11 @@ func (m *RouteSettings) Hash(hasher hash.Hash64) (uint64, error) { } + err = binary.Write(hasher, binary.LittleEndian, m.GetRouteType()) + if err != nil { + return 0, err + } + return hasher.Sum64(), nil } @@ -842,6 +861,10 @@ func (m *UpstreamSpec_OpenAI) Hash(hasher hash.Hash64) (uint64, error) { } } + if _, err = hasher.Write([]byte(m.GetModel())); err != nil { + return 0, err + } + return hasher.Sum64(), nil } @@ -866,6 +889,14 @@ func (m *UpstreamSpec_AzureOpenAI) Hash(hasher hash.Hash64) (uint64, error) { return 0, err } + if _, err = hasher.Write([]byte(m.GetDeploymentName())); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte(m.GetApiVersion())); err != nil { + return 0, err + } + switch m.AuthTokenSource.(type) { case *UpstreamSpec_AzureOpenAI_AuthToken: @@ -952,6 +983,10 @@ func (m *UpstreamSpec_Mistral) Hash(hasher hash.Hash64) (uint64, error) { } } + if _, err = hasher.Write([]byte(m.GetModel())); err != nil { + return 0, err + } + return hasher.Sum64(), nil } @@ -1016,6 +1051,210 @@ func (m *UpstreamSpec_Anthropic) Hash(hasher hash.Hash64) (uint64, error) { return 0, err } + if _, err = hasher.Write([]byte(m.GetModel())); err != nil { + return 0, err + } + + return hasher.Sum64(), nil +} + +// Hash function +// +// Deprecated: due to hashing implemention only using field values. The omission +// of the field name in the hash calculation can lead to hash collisions. +// Prefer the HashUnique function instead. +func (m *UpstreamSpec_MultiPool) Hash(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("ai.options.gloo.solo.io.github.com/solo-io/gloo/projects/gloo/pkg/api/v1/enterprise/options/ai.UpstreamSpec_MultiPool")); err != nil { + return 0, err + } + + for _, v := range m.GetPriorities() { + + if h, ok := interface{}(v).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(v, nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + + return hasher.Sum64(), nil +} + +// Hash function +// +// Deprecated: due to hashing implemention only using field values. The omission +// of the field name in the hash calculation can lead to hash collisions. +// Prefer the HashUnique function instead. +func (m *UpstreamSpec_MultiPool_Backend) Hash(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("ai.options.gloo.solo.io.github.com/solo-io/gloo/projects/gloo/pkg/api/v1/enterprise/options/ai.UpstreamSpec_MultiPool_Backend")); err != nil { + return 0, err + } + + switch m.Llm.(type) { + + case *UpstreamSpec_MultiPool_Backend_Openai: + + if h, ok := interface{}(m.GetOpenai()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Openai")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetOpenai(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Openai")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + case *UpstreamSpec_MultiPool_Backend_Mistral: + + if h, ok := interface{}(m.GetMistral()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Mistral")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetMistral(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Mistral")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + case *UpstreamSpec_MultiPool_Backend_Anthropic: + + if h, ok := interface{}(m.GetAnthropic()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Anthropic")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetAnthropic(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Anthropic")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + case *UpstreamSpec_MultiPool_Backend_AzureOpenai: + + if h, ok := interface{}(m.GetAzureOpenai()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("AzureOpenai")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetAzureOpenai(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("AzureOpenai")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + + return hasher.Sum64(), nil +} + +// Hash function +// +// Deprecated: due to hashing implemention only using field values. The omission +// of the field name in the hash calculation can lead to hash collisions. +// Prefer the HashUnique function instead. +func (m *UpstreamSpec_MultiPool_Priority) Hash(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("ai.options.gloo.solo.io.github.com/solo-io/gloo/projects/gloo/pkg/api/v1/enterprise/options/ai.UpstreamSpec_MultiPool_Priority")); err != nil { + return 0, err + } + + for _, v := range m.GetPool() { + + if h, ok := interface{}(v).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(v, nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + return hasher.Sum64(), nil } diff --git a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.uniquehash.go b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.uniquehash.go index cb963ccdb6f..507bd61bd28 100644 --- a/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.uniquehash.go +++ b/projects/gloo/pkg/api/v1/enterprise/options/ai/ai.pb.uniquehash.go @@ -187,6 +187,28 @@ func (m *UpstreamSpec) HashUnique(hasher hash.Hash64) (uint64, error) { } } + case *UpstreamSpec_Multi: + + if h, ok := interface{}(m.GetMulti()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Multi")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetMulti(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Multi")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + } return hasher.Sum64(), nil @@ -288,23 +310,6 @@ func (m *RouteSettings) HashUnique(hasher hash.Hash64) (uint64, error) { } } - if _, err = hasher.Write([]byte("BackupModels")); err != nil { - return 0, err - } - for i, v := range m.GetBackupModels() { - if _, err = hasher.Write([]byte(strconv.Itoa(i))); err != nil { - return 0, err - } - - if _, err = hasher.Write([]byte("v")); err != nil { - return 0, err - } - if _, err = hasher.Write([]byte(v)); err != nil { - return 0, err - } - - } - if _, err = hasher.Write([]byte("Defaults")); err != nil { return 0, err } @@ -335,6 +340,14 @@ func (m *RouteSettings) HashUnique(hasher hash.Hash64) (uint64, error) { } + if _, err = hasher.Write([]byte("RouteType")); err != nil { + return 0, err + } + err = binary.Write(hasher, binary.LittleEndian, m.GetRouteType()) + if err != nil { + return 0, err + } + return hasher.Sum64(), nil } @@ -897,6 +910,13 @@ func (m *UpstreamSpec_OpenAI) HashUnique(hasher hash.Hash64) (uint64, error) { } } + if _, err = hasher.Write([]byte("Model")); err != nil { + return 0, err + } + if _, err = hasher.Write([]byte(m.GetModel())); err != nil { + return 0, err + } + return hasher.Sum64(), nil } @@ -923,6 +943,20 @@ func (m *UpstreamSpec_AzureOpenAI) HashUnique(hasher hash.Hash64) (uint64, error return 0, err } + if _, err = hasher.Write([]byte("DeploymentName")); err != nil { + return 0, err + } + if _, err = hasher.Write([]byte(m.GetDeploymentName())); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte("ApiVersion")); err != nil { + return 0, err + } + if _, err = hasher.Write([]byte(m.GetApiVersion())); err != nil { + return 0, err + } + switch m.AuthTokenSource.(type) { case *UpstreamSpec_AzureOpenAI_AuthToken: @@ -1008,6 +1042,13 @@ func (m *UpstreamSpec_Mistral) HashUnique(hasher hash.Hash64) (uint64, error) { } } + if _, err = hasher.Write([]byte("Model")); err != nil { + return 0, err + } + if _, err = hasher.Write([]byte(m.GetModel())); err != nil { + return 0, err + } + return hasher.Sum64(), nil } @@ -1074,6 +1115,222 @@ func (m *UpstreamSpec_Anthropic) HashUnique(hasher hash.Hash64) (uint64, error) return 0, err } + if _, err = hasher.Write([]byte("Model")); err != nil { + return 0, err + } + if _, err = hasher.Write([]byte(m.GetModel())); err != nil { + return 0, err + } + + return hasher.Sum64(), nil +} + +// HashUnique function generates a hash of the object that is unique to the object by +// hashing field name and value pairs. +// Replaces Hash due to original hashing implemention only using field values. The omission +// of the field name in the hash calculation can lead to hash collisions. +func (m *UpstreamSpec_MultiPool) HashUnique(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("ai.options.gloo.solo.io.github.com/solo-io/gloo/projects/gloo/pkg/api/v1/enterprise/options/ai.UpstreamSpec_MultiPool")); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte("Priorities")); err != nil { + return 0, err + } + for i, v := range m.GetPriorities() { + if _, err = hasher.Write([]byte(strconv.Itoa(i))); err != nil { + return 0, err + } + + if h, ok := interface{}(v).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("v")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(v, nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("v")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + + return hasher.Sum64(), nil +} + +// HashUnique function generates a hash of the object that is unique to the object by +// hashing field name and value pairs. +// Replaces Hash due to original hashing implemention only using field values. The omission +// of the field name in the hash calculation can lead to hash collisions. +func (m *UpstreamSpec_MultiPool_Backend) HashUnique(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("ai.options.gloo.solo.io.github.com/solo-io/gloo/projects/gloo/pkg/api/v1/enterprise/options/ai.UpstreamSpec_MultiPool_Backend")); err != nil { + return 0, err + } + + switch m.Llm.(type) { + + case *UpstreamSpec_MultiPool_Backend_Openai: + + if h, ok := interface{}(m.GetOpenai()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Openai")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetOpenai(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Openai")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + case *UpstreamSpec_MultiPool_Backend_Mistral: + + if h, ok := interface{}(m.GetMistral()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Mistral")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetMistral(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Mistral")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + case *UpstreamSpec_MultiPool_Backend_Anthropic: + + if h, ok := interface{}(m.GetAnthropic()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Anthropic")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetAnthropic(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Anthropic")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + case *UpstreamSpec_MultiPool_Backend_AzureOpenai: + + if h, ok := interface{}(m.GetAzureOpenai()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("AzureOpenai")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetAzureOpenai(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("AzureOpenai")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + + return hasher.Sum64(), nil +} + +// HashUnique function generates a hash of the object that is unique to the object by +// hashing field name and value pairs. +// Replaces Hash due to original hashing implemention only using field values. The omission +// of the field name in the hash calculation can lead to hash collisions. +func (m *UpstreamSpec_MultiPool_Priority) HashUnique(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("ai.options.gloo.solo.io.github.com/solo-io/gloo/projects/gloo/pkg/api/v1/enterprise/options/ai.UpstreamSpec_MultiPool_Priority")); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte("Pool")); err != nil { + return 0, err + } + for i, v := range m.GetPool() { + if _, err = hasher.Write([]byte(strconv.Itoa(i))); err != nil { + return 0, err + } + + if h, ok := interface{}(v).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("v")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(v, nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("v")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + return hasher.Sum64(), nil } diff --git a/projects/gloo/pkg/api/v1/options/retries/retries.pb.clone.go b/projects/gloo/pkg/api/v1/options/retries/retries.pb.clone.go index da35fb400e8..f4f0c27e5d5 100644 --- a/projects/gloo/pkg/api/v1/options/retries/retries.pb.clone.go +++ b/projects/gloo/pkg/api/v1/options/retries/retries.pb.clone.go @@ -76,6 +76,15 @@ func (m *RetryPolicy) Clone() proto.Message { target.RetryBackOff = proto.Clone(m.GetRetryBackOff()).(*RetryBackOff) } + if m.GetRetriableStatusCodes() != nil { + target.RetriableStatusCodes = make([]uint32, len(m.GetRetriableStatusCodes())) + for idx, v := range m.GetRetriableStatusCodes() { + + target.RetriableStatusCodes[idx] = v + + } + } + switch m.PriorityPredicate.(type) { case *RetryPolicy_PreviousPriorities_: diff --git a/projects/gloo/pkg/api/v1/options/retries/retries.pb.equal.go b/projects/gloo/pkg/api/v1/options/retries/retries.pb.equal.go index 200929c057b..414cae997f4 100644 --- a/projects/gloo/pkg/api/v1/options/retries/retries.pb.equal.go +++ b/projects/gloo/pkg/api/v1/options/retries/retries.pb.equal.go @@ -118,6 +118,17 @@ func (m *RetryPolicy) Equal(that interface{}) bool { } } + if len(m.GetRetriableStatusCodes()) != len(target.GetRetriableStatusCodes()) { + return false + } + for idx, v := range m.GetRetriableStatusCodes() { + + if v != target.GetRetriableStatusCodes()[idx] { + return false + } + + } + switch m.PriorityPredicate.(type) { case *RetryPolicy_PreviousPriorities_: diff --git a/projects/gloo/pkg/api/v1/options/retries/retries.pb.go b/projects/gloo/pkg/api/v1/options/retries/retries.pb.go index 1ef0d056c35..af838c4e635 100644 --- a/projects/gloo/pkg/api/v1/options/retries/retries.pb.go +++ b/projects/gloo/pkg/api/v1/options/retries/retries.pb.go @@ -103,6 +103,10 @@ type RetryPolicy struct { // // *RetryPolicy_PreviousPriorities_ PriorityPredicate isRetryPolicy_PriorityPredicate `protobuf_oneof:"priority_predicate"` + // Optional: HTTP status codes that should trigger a retry in addition to those specified by retry_on. + // This can be useful if you want to retry on a status code that is not in the retry_on list. + // Specifically those in the 4xx range. + RetriableStatusCodes []uint32 `protobuf:"varint,6,rep,packed,name=retriable_status_codes,json=retriableStatusCodes,proto3" json:"retriable_status_codes,omitempty"` } func (x *RetryPolicy) Reset() { @@ -179,6 +183,13 @@ func (x *RetryPolicy) GetPreviousPriorities() *RetryPolicy_PreviousPriorities { return nil } +func (x *RetryPolicy) GetRetriableStatusCodes() []uint32 { + if x != nil { + return x.RetriableStatusCodes + } + return nil +} + type isRetryPolicy_PriorityPredicate interface { isRetryPolicy_PriorityPredicate() } @@ -267,7 +278,7 @@ var file_github_com_solo_io_gloo_projects_gloo_api_v1_options_retries_retries_pr 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x22, 0xc4, 0x03, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x22, 0xfa, 0x03, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, @@ -288,19 +299,23 @@ var file_github_com_solo_io_gloo_projects_gloo_api_v1_options_retries_retries_pr 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x79, 0x42, 0x14, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x4e, 0xb8, 0xf5, 0x04, 0x01, 0xc0, 0xf5, 0x04, - 0x01, 0xd0, 0xf5, 0x04, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x6c, 0x6f, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x67, 0x6c, 0x6f, 0x6f, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x47, + 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x14, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x4e, 0xb8, + 0xf5, 0x04, 0x01, 0xc0, 0xf5, 0x04, 0x01, 0xd0, 0xf5, 0x04, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, + 0x67, 0x6c, 0x6f, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x67, 0x6c, + 0x6f, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/projects/gloo/pkg/api/v1/options/retries/retries.pb.hash.go b/projects/gloo/pkg/api/v1/options/retries/retries.pb.hash.go index bb5bbf8962d..e2fdfe98619 100644 --- a/projects/gloo/pkg/api/v1/options/retries/retries.pb.hash.go +++ b/projects/gloo/pkg/api/v1/options/retries/retries.pb.hash.go @@ -151,6 +151,11 @@ func (m *RetryPolicy) Hash(hasher hash.Hash64) (uint64, error) { } } + err = binary.Write(hasher, binary.LittleEndian, m.GetRetriableStatusCodes()) + if err != nil { + return 0, err + } + switch m.PriorityPredicate.(type) { case *RetryPolicy_PreviousPriorities_: diff --git a/projects/gloo/pkg/api/v1/options/retries/retries.pb.uniquehash.go b/projects/gloo/pkg/api/v1/options/retries/retries.pb.uniquehash.go index a534b4cd1e3..21d397ce877 100644 --- a/projects/gloo/pkg/api/v1/options/retries/retries.pb.uniquehash.go +++ b/projects/gloo/pkg/api/v1/options/retries/retries.pb.uniquehash.go @@ -157,6 +157,14 @@ func (m *RetryPolicy) HashUnique(hasher hash.Hash64) (uint64, error) { } } + if _, err = hasher.Write([]byte("RetriableStatusCodes")); err != nil { + return 0, err + } + err = binary.Write(hasher, binary.LittleEndian, m.GetRetriableStatusCodes()) + if err != nil { + return 0, err + } + switch m.PriorityPredicate.(type) { case *RetryPolicy_PreviousPriorities_: diff --git a/projects/gloo/pkg/plugins/basicroute/plugin.go b/projects/gloo/pkg/plugins/basicroute/plugin.go index b0330875754..524917f34b8 100644 --- a/projects/gloo/pkg/plugins/basicroute/plugin.go +++ b/projects/gloo/pkg/plugins/basicroute/plugin.go @@ -385,18 +385,20 @@ func convertPolicy(policy *retries.RetryPolicy) (*envoy_config_route_v3.RetryPol // If max and/or/both base intervals are defined, return a RetryPolicy object that contains them return &envoy_config_route_v3.RetryPolicy{ - RetryOn: policy.GetRetryOn(), - NumRetries: &wrappers.UInt32Value{Value: numRetries}, - PerTryTimeout: policy.GetPerTryTimeout(), - RetryBackOff: v3RetryPolicyBackOff, - RetryPriority: retryPriority, + RetryOn: policy.GetRetryOn(), + NumRetries: &wrappers.UInt32Value{Value: numRetries}, + PerTryTimeout: policy.GetPerTryTimeout(), + RetryBackOff: v3RetryPolicyBackOff, + RetryPriority: retryPriority, + RetriableStatusCodes: policy.GetRetriableStatusCodes(), }, nil } return &envoy_config_route_v3.RetryPolicy{ - RetryOn: policy.GetRetryOn(), - NumRetries: &wrappers.UInt32Value{Value: numRetries}, - PerTryTimeout: policy.GetPerTryTimeout(), - RetryPriority: retryPriority, + RetryOn: policy.GetRetryOn(), + NumRetries: &wrappers.UInt32Value{Value: numRetries}, + PerTryTimeout: policy.GetPerTryTimeout(), + RetryPriority: retryPriority, + RetriableStatusCodes: policy.GetRetriableStatusCodes(), }, nil } diff --git a/projects/gloo/pkg/plugins/basicroute/plugin_test.go b/projects/gloo/pkg/plugins/basicroute/plugin_test.go index 69701877ead..ed6e87e7db0 100644 --- a/projects/gloo/pkg/plugins/basicroute/plugin_test.go +++ b/projects/gloo/pkg/plugins/basicroute/plugin_test.go @@ -329,16 +329,18 @@ var _ = Describe("retries empty backoff", func() { BeforeEach(func() { t := prototime.DurationToProto(time.Minute) retryPolicy = &retries.RetryPolicy{ - RetryOn: "if at first you don't succeed", - NumRetries: 5, - PerTryTimeout: t, + RetryOn: "if at first you don't succeed", + NumRetries: 5, + PerTryTimeout: t, + RetriableStatusCodes: []uint32{404, 429}, } expectedRetryPolicy = &envoy_config_route_v3.RetryPolicy{ RetryOn: "if at first you don't succeed", NumRetries: &wrappers.UInt32Value{ Value: 5, }, - PerTryTimeout: t, + PerTryTimeout: t, + RetriableStatusCodes: []uint32{404, 429}, } })