Skip to content

[Bug]: No validation in adding the token duration with spaces #2491

Description

@Tharanidk

Please select the area the issue is related to

Area/Management (Management API or Management Portal UI)

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI), Aspect/Monitoring (Metrics, observability, health checks, alerts)

Description

When configuring a Token Based Ratelimit policy on an LLM Provider under the Global Guardrails & Policies section, the duration field accepts values that are not valid for example "10 m". The invalid value is accepted by the UI, saved by the Platform API, and the deployment reports success .

Image

No validation error is shown at save time, deploy time, or runtime. The user believes a limit is active when it is not. The rate limit has silently dropped.

Steps to Reproduce

  1. Open an LLM Provider in AI Workspace → Global Guardrails & Policies → add Token Based Ratelimit (v1).
  2. Under totalTokenLimits → Item 1, set count = 56 and duration = 10 m (with a space).
  3. Save the policy and Deploy to Gateway.
  4. Send a chat completion request whose token usage exceeds the limit.
  5. Repeat the request 2–3 times.

Severity Level of the Issue

Severity/Trivial (Cosmetic issues. Can be fixed in future releases)

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

Labels

Area/AIWorkspaceIssues related to AI WorkspaceArea/ManagementAny issues related to Management API or Management Portal UIAspect/APIAPI definitions, contracts, OpenAPI, interfacesAspect/MonitoringMetrics, observability, health checks, alertsAspect/UIFrontend, visual layouts, components, stylingSeverity/TrivialType/Bug

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions