Token Based Rate limit policy failing when all optional parameters are not configured
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Please select the area the issue is related to
Area/Policies (Policies, Policy Hub, Policy Engine etc)
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
When the token based rate limit policy is configured with only one of the following optional parameters
The policy initialises successfully but fails at runtime when trying to delegate to advanced-ratelimit
Steps to Reproduce
- Deploy a selfhosted ai-gateway with debug logs enabled for router, controller and polcy-engine
- Deploy an OpenAI LLM provider
- Add
Token Based Ratelimitpolicy to the provider with onlypromptTokenLimitsset - Save and redeploy the LLM provider
- Notice the logs in the gateway, the policy chain would have successfully been updated
- Make an api call to the provider
- Notice the error logs in console
Severity Level of the Issue
Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)
Environment Details (with versions)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the Token Based Ratelimit policy configured with only promptTokenLimits, using the described self-hosted AI gateway setup and debug logs. Inspect the policy's delegation to advanced-ratelimit; done means the policy runs successfully at request time when optional parameters are omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100