Hansi

Curious about your code.

AI code review for GitHub, powered by the model you choose. It looks for bugs, double-checks what it finds, and approves the rest.

Install on GitHub Free during the beta.

feat: let customers cancel orders #42

Open anna wants to merge 3 commits into main

B

Hansi requested changes Changes requested

B Needs changes before merging

Adds order cancellation. One bug lets shipped orders be cancelled; everything else looks good.

1 comment 3 files reviewed 2 findings filtered out
src/orders.ts
31 export async function cancelOrder(id: string) {
- const order = await db.orders.find(id);
32+ const order = db.orders.find(id);

Missing await

find() returns a promise, so order.status is always undefined and shipped orders can be cancelled.

+ const order = await db.orders.find(id);
33 if (order.status === 'shipped') throw new Error('Already shipped');

Comments on bugs, not style

Hansi looks for the bugs you would want a teammate to catch: a missing await, an inverted check, an off-by-one. A second pass drops anything it can't confirm in the code.

3 possible issues found

2 dropped after double-checking

1 comment posted

Approves like a teammate

Clean pull requests get approved. When something is wrong, Hansi requests changes, and once you push the fix it checks again and approves.

Hansi requested changes

anna pushed 1 commit

Hansi approved these changes

A grade for every pull request

Each review ends with a grade from S, ready to merge, to F, do not merge. Open findings cap the grade, so it always matches what Hansi found.

SABCDF

Bring your own model

Hansi runs on your key and the model you pick, so how deep the reviews go and what they cost is your call. You can review with a stronger model and double-check with a cheaper one.

  • OpenAI
  • Anthropic
  • Amazon Bedrock
  • Google Gemini
  • xAI
  • OpenRouter
  • Cerebras

Free during the beta

Unlimited repositories and reviews while Hansi is in beta. You pay your model provider directly for the tokens each review uses, and Hansi shows you the cost of every review.

$0per month

  • Unlimited repositories
  • Reviews on every push
  • Approvals, grades, and inline fixes
  • Your own model and API key
Install on GitHub

Questions

Which models can Hansi use?

Any model from OpenAI, Anthropic, xAI, Google, OpenRouter, or Cerebras, plus any OpenAI-compatible endpoint. You can use a stronger model to review and a cheaper one to double-check findings.

How good are the reviews?

That depends mostly on the model you choose. Every model gets the same tools and the same skeptical second pass, but a stronger model will usually spot subtler bugs. Every review shows its cost, so you can weigh one against the other.

What does it cost?

Hansi is free during the beta. You pay your model provider directly for the tokens each review uses, and every review shows its token usage and cost.

What happens to my code?

Hansi reads the pull request to review it and sends the relevant code to the model provider you chose. The checkout is deleted when the review finishes.

Will it flood my pull requests with comments?

Hansi is built to comment only on bugs, and a second pass drops anything it cannot confirm in the code. Clean pull requests usually get no comments, just an approval.

Can it approve pull requests?

Yes. Hansi approves clean pull requests and requests changes when it finds a problem it could confirm. It never approves pull requests from people without write access to the repository.

Let Hansi review your next pull request.

Install on GitHub