diff --git a/common/api/generated/types.gen.ts b/common/api/generated/types.gen.ts index 61abe3230..2fdb86978 100644 --- a/common/api/generated/types.gen.ts +++ b/common/api/generated/types.gen.ts @@ -36,8 +36,8 @@ export type GithubComStacklokToolhiveCoreRegistryTypesRegistry = { } /** - * Shared defines a token bucket shared across all users for this specific tool. - * +kubebuilder:validation:Required + * PerUser token bucket configuration for this tool. + * +optional */ export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket = { @@ -58,6 +58,7 @@ export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket = */ export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitConfig = { + perUser?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket shared?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket /** * Tools defines per-tool rate limit overrides. @@ -78,6 +79,7 @@ export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1ToolRateLimitConfi * +kubebuilder:validation:MinLength=1 */ name?: string + perUser?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket shared?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket } diff --git a/common/api/openapi.json b/common/api/openapi.json index d2351b5ed..4b582976a 100644 --- a/common/api/openapi.json +++ b/common/api/openapi.json @@ -38,7 +38,7 @@ "type": "object" }, "github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket": { - "description": "Shared defines a token bucket shared across all users for this specific tool.\n+kubebuilder:validation:Required", + "description": "PerUser token bucket configuration for this tool.\n+optional", "properties": { "maxTokens": { "description": "MaxTokens is the maximum number of tokens (bucket capacity).\nThis is also the burst size: the maximum number of requests that can be served\ninstantaneously before the bucket is depleted.\n+kubebuilder:validation:Required\n+kubebuilder:validation:Minimum=1", @@ -53,6 +53,9 @@ "github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitConfig": { "description": "RateLimitConfig contains the CRD rate limiting configuration.\nWhen set, rate limiting middleware is added to the proxy middleware chain.", "properties": { + "perUser": { + "$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket" + }, "shared": { "$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket" }, @@ -73,6 +76,9 @@ "description": "Name is the MCP tool name this limit applies to.\n+kubebuilder:validation:Required\n+kubebuilder:validation:MinLength=1", "type": "string" }, + "perUser": { + "$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket" + }, "shared": { "$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket" } diff --git a/utils/constants.ts b/utils/constants.ts index 05466d551..36e633874 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -3,4 +3,4 @@ * This is managed by Renovate and updated automatically when new versions are released. * renovate: datasource=github-releases depName=stacklok/toolhive versioning=semver */ -export const TOOLHIVE_VERSION = process.env.THV_VERSION ?? 'v0.17.0' +export const TOOLHIVE_VERSION = process.env.THV_VERSION ?? 'v0.18.0'