Every AI request, routed by how hard it is.
Simple prompts go to fast, cheap models;
hard reasoning goes to your best.
One endpoint, any provider, no code changes.
Try it free → https://t.co/rjw0faAfdX
Not every AI API 429 should retry.
On Claude’s Messages API, check for enforced_spend_limit_reached and stop the retry loop.
For temporary throttling, honor Retry-After when
present and retry only within the task deadline.
Test both paths with a stubbed 429.
Streaming token totals inflated?
Claude message_delta usage is cumulative: 10 → 25 → 40 means 40 output tokens so far, not 75.
Update the latest count per response. Test repeated events + interrupted streams; mark incomplete totals. Check each provider’s event semantics.
Switching AI models? Canary the route.
Send a small cohort to the candidate. Compare quality, errors, latency + cost per accepted result against the current model. Inspect each group separately.
Set stop thresholds and test rollback before expanding. HTTP 200 isn’t quality.
One tenant flooding your AI gateway?
Limit request rate, in-flight calls + estimated tokens per tenant, alongside global limits. Bound waiting queues.
Test: burst long requests from A while B stays steady. Measure B’s queue wait, latency + failures across app instances.
Longer prompt-cache TTL ≠ lower cost.
Measure gaps between uses of the same prefix. Compare supported TTLs using ordinary input + cache-write + cache-read cost—not hit rate alone.
Include entries never reused. Check model eligibility, latency and answer quality.
Switching AI models shouldn't mean editing env vars, swapping endpoints, and redeploying.
With ZRouter virtual models, your app calls one name like "coder". You change the model behind it in the gateway. Done.
https://t.co/Vhge0REEkK
Give an AI request one deadline.
Example: 10s total, 7s spent on model A → at most 3s left for fallback B, including overhead. Don’t reset the clock.
Include queue time + retries. Propagate cancellation where supported; check whether upstream work actually stops.
Trim unused AI output before lowering the cap.
“Analyze this ticket” → “Return category, 1-sentence summary + next action.”
Test the token ceiling on long cases. Check required fields + truncation. Compare output tokens, completion time and answer quality.
Background AI jobs slowing live chat?
Separate their concurrency pools. Reserve chat capacity, cap background calls and bound the queue. Check shared provider quotas too.
Test: saturate background work, then send chat requests. Measure queue wait + chat latency—not just RPM.
One model name. Three levels of intelligence.
ZRouter Super Intelligence routes by task complexity:
→ Simple: Luna
→ Standard: Sol
→ Complex: Astra
Create your virtual model with zctl. Keep one model name in your app.
Which AI model actually answered?
Log requested route + each upstream target + response model when reported. Link attempts to one task ID; keep unknowns explicit.
Force A to fail, let B answer. Check the trace preserves both attempts and attributes usage to the right target.
The models keep getting smarter. The time from idea to working app keeps shrinking.
The real competition isn't who writes code faster anymore.
It's who can turn an idea into a reliable product and ship it.
Builders, are you ready for another model upgrade? 🚀
Developers haven't even finished exploring Opus 5.5, and Anthropic is already teasing us with Fable 5.5 rumors. 😂
Hints are reportedly showing up in code repositories. 👀
Meanwhile, we're still debating whether vibe coders are real developers.
AI provider keeps timing out?
Use a circuit breaker: pause calls after a failure threshold, then allow limited recovery probes.
Use a tested fallback or return a clear temporary failure. Keep an overall deadline.
Test recovery under load—not just the first failure.
Short message, large input? Count the full request: instructions, history, tools + retrieved content.
Use the target model’s token counter where supported. Remove irrelevant context, then test quality.
Compare preflight estimates with actual usage—not just the visible prompt.
Caching AI answers? Test freshness.
Warm the cache → change the source → ask again.
Invalidate affected answers or version the key. Set expiry by change rate + stale-answer risk. Bypass reuse when freshness is essential.
Track stale answers alongside hit rate and cost.
An AI tool times out after creating a ticket. A blind retry can create it twice.
Reuse one operation ID for the same write. The receiving service must deduplicate atomically and return the stored result.
Test a lost response + concurrent retries. A header alone isn’t enough.
Built free trial models into ZRouter this week.
Interesting bit: a per-user cap alone isn't enough. 10k users × 1M tokens is still a huge bill. So there's also a global daily pool, and both are checked on every request.