Skip to content

feat(ai-gateway): MCP rate limiting support - #7658

Open
tomek-labuk wants to merge 7 commits into
release/ai-gateway-2.3from
feat/mcp-rate-limiting
Open

tomek-labuk wants to merge 7 commits into
release/ai-gateway-2.3from
feat/mcp-rate-limiting

Conversation

@tomek-labuk

@tomek-labuk tomek-labuk commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit a442e35
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6adb0713e6544f782756acb5
😎 Deploy Preview https://deploy-preview-7658--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@tomek-labuk tomek-labuk added product:ai-gateway size: S Small estimated effort. Fixing a broken link, updating wording in an FAQ or paragraph labels Oct 21, 2026
@tomek-labuk tomek-labuk added this to the AIGW 2.3 milestone Oct 21, 2026
@tomek-labuk
tomek-labuk force-pushed the feat/mcp-rate-limiting branch from ed4bc52 to 8ba10a9 Compare October 21, 2026 13:17
@tomek-labuk tomek-labuk self-assigned this Oct 22, 2026
@tomek-labuk
tomek-labuk force-pushed the feat/mcp-rate-limiting branch from 8ba10a9 to 36ab3d8 Compare October 22, 2026 08:47
@tomek-labuk
tomek-labuk marked this pull request as ready for review October 22, 2026 08:47
@tomek-labuk
tomek-labuk requested a review from a team as a code owner October 22, 2026 08:47
@kong-ksai

kong-ksai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ KSAI Review: Finished


Run report (federated) · 1 paid run · $0.2171 total
# Engine Result Model Turns Cost
1 opencode success deepseek-ai/deepseek-v4.1-flash/max 59 $0.2171

Reviewing cost $0.2171

kong-ksai[bot]

This comment was marked as resolved.

@Guaris Guaris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording here is a bit dense.

Unrelated to your changes in this PR, this doc is getting massive. Can we consider splitting it up into sections after the release?

Comment thread app/_ai_gateway_entities/ai-mcp-server.md Outdated
Comment thread app/_ai_gateway_entities/ai-mcp-server.md Outdated
Comment on lines +560 to +561
- **Protect an expensive tool**: limit a single tool, such as `search_flights`, to a small number of calls per second, without slowing down the rest of the server.
- **Cap overall tool usage**: limit all `tools/call` requests per minute, regardless of which tool the client calls.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two cases feel the same to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, true. Let me trim it


- **Protect an expensive tool**: limit a single tool, such as `search_flights`, to a small number of calls per second, without slowing down the rest of the server.
- **Cap overall tool usage**: limit all `tools/call` requests per minute, regardless of which tool the client calls.
- **Layer short and long windows**: combine a per-second limit to absorb bursts with a per-day limit to control total usage for the same tool.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this one means at all.

@tomek-labuk tomek-labuk Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually. After a second thought: this is an overkill. Let me delete this section, these are covered across other docs.

@tomek-labuk

Copy link
Copy Markdown
Contributor Author

Wording here is a bit dense.

Unrelated to your changes in this PR, this doc is getting massive. Can we consider splitting it up into sections after the release?

@Guaris - true. I'll create a ticket for the non-release Nov milestone to do it.

@tomek-labuk
tomek-labuk force-pushed the feat/mcp-rate-limiting branch from e60006f to a442e35 Compare October 23, 2026 07:04
@tomek-labuk
tomek-labuk requested a review from Guaris October 23, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:ai-gateway size: S Small estimated effort. Fixing a broken link, updating wording in an FAQ or paragraph

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants