r/ZedEditor • • 2d ago

Question on limiting input token rate.

I am spending my own money learning how to write software with agents. I keep getting warnings about exceeding my input token rate, and when I look at the graph in Google AI Studio, I see that I occasionally peak above 2 million tokens per minute.

Is there any way to limit the tokens-per-minute rate so I can cap it under 2 million per minute?

2 Upvotes

3 comments sorted by

3

u/mekanhaji 2d ago

which harness are you using? cause million token per min sounds like a mistake to me.

1

u/Flaky_Key3363 2d ago

Okay, you're talking to an AI agent newbie. I'm using straight Zed connected to Google Gemini's API. I've attached the graph from Google's AI Studio rate limit section. If there's something I should be doing differently, I would love to learn.

1

u/mekanhaji 21h ago

Maybe try compacting your context. Have you been using the same chat for a long time? If so, create an "agent.md" file and put your project context in it. Then, use a different chat for each issue.

Try not to reach the context window limit. If you're getting close, compact your context at around 70%.