anomalyco / anomalyco/opencode
Groq requests exceed TPM limit even in an empty directory
@kitlangton is already working on this.
Since Jul 21, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Bug: Groq requests exceed TPM limit even in an empty directory
Environment
-
OpenCode version: 1.18.4
-
OS: Linux 6.17.0-PRoot-Distro (Termux + Ubuntu PRoot, arm64)
-
Provider: Groq
-
Models tested:
groq/llama-3.1-8b-instantgroq/openai/gpt-oss-20b
Description
OpenCode consistently sends requests that exceed Groq's Tokens Per Minute (TPM) limit, even when started in an empty directory with a brand-new session.
The problem occurs before any meaningful user prompt is sent. Even the hidden title request exceeds the TPM limit.
This makes OpenCode unusable with Groq's free tier.
Steps to reproduce
- Install OpenCode 1.18.4.
- Configure a valid Groq API key.
- Create an empty directory:
mkdir empty
cd empty
- Run:
opencode run hi --print-logs
Expected behavior
The prompt for a one-word request (hi) should be small enough to fit within Groq's TPM limits.
Actual behavior
The request is rejected immediately:
For llama-3.1-8b-instant:
Request too large for model `llama-3.1-8b-instant`
Limit 6000 TPM
Requested 42781
For openai/gpt-oss-20b:
Request too large for model `openai/gpt-oss-20b`
Limit 8000 TPM
Requested 38369
Diagnostics performed
I verified all of the following:
- Fresh Groq API key
- Fresh Groq account
- Empty directory
- New OpenCode session
opencode runopencode --pure- No project files
- No
AGENTS.md - No plugins
- Default configuration
- Multiple Groq models
Resolved configuration:
{
"$schema": "https://opencode.ai/config.json",
"compaction": {
"auto": false,
"prune": false
},
"agent": {},
"mode": {},
"plugin": [],
"command": {},
"username": "root"
}
opencode debug info:
opencode version: 1.18.4
plugins: none
Additional observations
The requests appear to have nearly constant sizes across completely fresh sessions:
Title agent
Approximately 32.5k tokens
agent=title
Requested 32550 tokens
Build agent
Approximately 42.7k tokens
agent=build
Requested 42781 tokens
GPT-OSS
agent=title
Requested 32589 tokens
agent=build
Requested 38369 tokens
The consistency suggests the large token count is not coming from my project or conversation history.
Question
Is OpenCode intentionally sending a very large internal prompt/tool schema to Groq, or could this be a regression in prompt construction or the Groq provider integration?
I'm happy to run additional diagnostics or test a development build if that would help.
Plugins
none
OpenCode version
1.18.4
Steps to reproduce
just said hi in a new chat using groq gpt oss or any groq model
Screenshot and/or share link
Operating System
proot-distro ubuntu
Terminal
termux
Contributor guide
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.
Assessment
This issue has not been assessed yet.