Six instruments · one relay

Fix bugs, bound complexity, and port code. Right in the browser.

GenieLabs is a set of narrow, honest tools for code that has to be right. Answers arrive token by token instead of after a spinner, and a relay in front of two model providers means a request never dies half-finished.

Input cap
20,000 chars
Protocol
SSE, live
Providers
GLM-4.6, Codestral
Cost
free, no account
findDuplicatesidle

input

Generated output
function findDuplicates(items) {
const seen = new Set();
const duplicates = [];
for (const item of items) {
if (seen.has(item)) {
duplicates.push(item);
}
seen.add(item);
}
return duplicates;
}

patched code

This runs live

The snippet reports every repeat instead of each duplicated value once. Press find the bugs and watch the patch arrive token by token.

  • Set membership that is never undone
  • Duplicate reporting vs. duplicate values
  • The edge case the original misses

Try it, this is the real relay, not a recording.

javascript·streaming over SSEopen the full instrument
02How the relay works

Two providers, one stream, no half-answers

Most wrappers pick one vendor and hope. This one normalises two very different stream formats, caps what a caller can ask for, and fails over only while that is still safe to do.

request path
01

Browser

POST /api/codestral-proxy

The page posts a prompt and reads the response as a stream of deltas. There is no spinner and no polling, tokens appear as the model emits them, and the request is cancellable with the Stop button.

02

Relay

clamp · rate limit · cache · timeout

Input is size-capped, the token budget and temperature are clamped server-side, and each address gets a token bucket. Nothing about the configured providers is visible to the client.

providers

Primary

glm-4.6:cloud

ollama.com

Handles the request. Chosen because it holds long instructions and structured output formats.

Fallback

codestral-latest

api.mistral.ai

Takes over if the primary refuses or stalls before the first token. Never mid-stream, a half-switched answer would splice two models together.

Keys are rotated across every configured value, and a key that fails is put in a short cooldown instead of being retried on the next request.

relay statuschecking…
Primary
not configured
Fallback
not configured
Transport
server-sent events, token by token
Budget
,

What a failure looks like

  • rate_limited

    Too many requests from one address. Retry-After is set.

  • timeout

    The model took longer than 45 seconds. The stream is closed cleanly.

  • provider_unavailable

    Both providers refused. The error names the code, not the vendor.

  • prompt_too_long

    Input over the cap is rejected rather than silently truncated.

Privacy by construction

  • Your input is held in the page and in this browser's local storage.
  • It is forwarded for one request and is not written to any GenieLabs database.
  • Drafts never leave the device until you press run.
03Before you paste anything

The questions that matter when you are handing over source code

What does GenieLabs actually do?
It provides six browser-based instruments for working with code: a bug finder that returns a corrected function and a line diff of the change, a complexity analyser that reports time and space in Big-O notation, a code explainer that produces documentation, a converter that ports code between twelve languages, a SQL generator that writes a query from a plain-English question, and a regular expression builder and tester. Each one runs entirely in the browser and answers through a streaming API.
Is my source code stored anywhere?
No. Input stays in the page and in your browser's local storage, where it is used to restore your draft after a refresh. It is forwarded to the configured model provider for the single request you trigger, and is not written to any GenieLabs database. See the security page for the specifics.
Does GenieLabs cost anything?
No. There is no account, no trial, no card and no usage meter. The instruments are free to use within the relay's rate limit, which is 12 requests per minute per address.
Which languages are supported?
JavaScript, TypeScript, Python, Java, C#, C++, Go, Ruby, PHP, Rust, SQL and shell. The bug finder, complexity analyser, code explainer and converter all work across that set, and the converter can port between any two of them.
Why do the answers arrive gradually instead of all at once?
Because the relay streams. Tokens are pushed to the page over server-sent events as the model produces them, so the first sentence is readable within a second rather than after a full response. You can stop a request mid-answer, and the panel reports the elapsed time and the provider that answered.
What happens if the model provider fails?
If the primary provider refuses or stalls before sending the first token, the relay switches to the second provider and the answer continues. Once tokens have started flowing it stays with that provider, because splicing two different models' output into one answer would be worse than an honest error. Failures surface as a named code such as rate_limited or timeout, with a retry button.
Can I trust the output?
Treat it as a reviewed first draft. The bug finder is a second opinion on the snippet you pasted and cannot see your call sites or types. Generated code has not been compiled against your project. The complexity bounds assume the shape of the code as written. Every answer should be read before it is merged.
GenieLabs

Pick a defect you have been meaning to fix and read the diff.

No account, no install, nothing to configure. Paste code on the left, press run, and read what came back before you commit anything.