Archestra Apps HackathonJoin now

Thread

NK
Neetin Kumar9:54 AMOpen in Slack
I am facing rate_limit error , Too many requests. Please wait a moment and try again.
any quick workaround ?
Status: 429
Type: unknown_api_error
Message: Failed after 3 attempts. Last error: 429 status code (no body)

Raw Error:
{
  "url": "<http://localhost:9000/v1/cerebras/0ed72c90-cea3-490b-ac3c-d04843dc2fb0/chat/completions>",
  "statusCode": 429,
  "isRetryable": true,
  "responseBody": {
    "error": {
      "message": "429 status code (no body)",
      "type": "unknown_api_error"
    }
  }
}```

6 replies
A
Archestra9:54 AMOpen in Slack
Cerebras is rate-limiting you (429). Quick workarounds: - Wait ~30–60s and retry. - Switch to another model/provider temporarily. - Slow down request frequency / reduce parallel calls. If it keeps happening, drop your setup here and we'll dig in. πŸ€– Slack Agent
MK
Matvey Kukuy (archestra team)9:54 AMOpen in Slack
Seems like @user's right. Is it happening too often?
NK
Neetin Kumar10:01 AMOpen in Slack
its happening again and again , even for small prompt , its utilising all my free token credits :facewithpeeking_eye:
zai-glm-4.7 , I am using this model
A
Archestra10:01 AMOpen in Slack
Cerebras free tier has tight per-minute limits, so even small prompts hit 429 quickly. Options: - Switch provider for now (OpenAI/Anthropic/Groq). - Add your own Cerebras API key to lift the shared limit. - Space out requests / avoid parallel calls. Want steps to swap the provider or add a key? πŸ€– Slack Agent
MK
Matvey Kukuy (archestra team)10:04 AMOpen in Slack
@user investigate what could be done to reduce token consumption, check codebase
A
Archestra10:05 AMOpen in Slack
I'll investigate the codebase to understand token consumption and what could reduce it. No attachments. Let me check the Archestra codebase for how token consumption works. There's a context-compaction.ts β€” that's key. Let me look at that and the LLM request building. I have a clear picture now. The main token consumers are: system prompt, tool schemas, conversation history, tool results, and file attachments. Let me check the tool-related consumption since that's often the biggest lever. I have enough to give concrete, codebase-grounded advice. The key insight: Archestra has *dynamic tool discovery (searchtools/runtool) and auto-compaction β€” the biggest token consumers are tool schemas and conversation history. Let me write up findings. Confirmed. Here's my reply. Reply to post in thread: > Dug into the codebase. Biggest token drivers per request: tool schemas, conversation history, tool results, and file attachments (see context-window-breakdown.ts). > > What you can do: > β€’ Trim tools β€” if the agent has "access all tools" on, every tool schema is sent each turn. Turn it off + rely on dynamic search_tools/run_tool, or exclude unused tools. Usually the single biggest saving. > β€’ Shorten the system prompt β€” it's sent every turn. > β€’ Start fresh conversations β€” history is resent each turn; auto-compaction only kicks in at 80% of the context window. > β€’ Avoid dumping large files/tool outputs* into context. > > The Context Window Visualizer in the UI shows exactly what's eating your budget β€” check it to target the worst offender first. Want me to post that to the thread, or check anything more specific (like your agent's tool config)? πŸ€– Slack Agent