Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

OpenRouter Guide Builds a Sandbox-Based AI Code Reviewer

AI summary

OpenRouter published a 233-line Python script that uses the OpenRouter Responses API to upload changed files, test or other context files, and a Git diff to a hosted Linux sandbox. A model can run checks to reproduce suspected bugs and propose V4A patches. The script runs locally, in a Git pre-push hook, or in GitHub Actions, and labels findings as confirmed or unconfirmed, with commands and output supporting confirmed results. In OpenRouter’s own tests of four models on a five-bug change, reviews took one to four minutes and cost $0.015 to $0.045. The Files API, Shell tool, and Apply Patch tool are beta features whose behavior may change; models may also miss bugs, overstate severity, or generate broken patches.

In-depth insight

The guide provides a concrete way to ground AI code-review findings in runtime checks rather than relying only on diff inspection. It also distinguishes confirmed findings from unconfirmed notes that should receive human review.

Build an AI Code Reviewer with OpenRouter

OpenRouter ·11/1/2026

Build an AI Code Reviewer with OpenRouter
Build an AI Code Reviewer with OpenRouter

An AI code reviewer checks a Git change for bugs and security issues before you push or merge. Reviewers that only read the diff have to guess what the rest of the file looks like and whether a suspected bug actually fails at runtime, and their suggested fixes come back as text you copy in by hand.

The reviewer in this guide uses the OpenRouter Responses API to run your changed files in a Linux sandbox, confirm each bug by running a check, and return fixes as patches you can apply with a flag. Across the four models we tested on a five-bug change, a review takes one to four minutes and costs between $0.015 and $0.045.

#OpenRouter#OpenRouter Responses API#OpenRouter Files API#OpenRouter Shell tool#OpenRouter Apply Patch tool#Claude Haiku 5.5#Claude Sonnet 5.5#GPT-6 Luna#DeepSeek V4.1 Flash

Original · 20 min readRead the original
Group chat

No comments yet. Start the conversation.