DEV Community

Cover image for Empire LLM for Codex: AI Code Review Without the Chaos
Dave Kurian
Dave Kurian

Posted on • Originally published at otf-kit.dev

Empire LLM for Codex: AI Code Review Without the Chaos

The single principle that makes this plugin worth installing

A clean principle beats a clever feature every time. Empire LLM for Codex ships one: external models contribute evidence, not authority. That sentence is the product. It is also the right answer to a problem every team shipping with multiple AI models has already hit.

Most "AI code review" plugins treat external models like copilots with partial access. Some will edit files. Some will run commands. A few will quietly approve their own patches. When you stack three or four of these together you do not get three or four opinions — you get three or four partial agents arguing about your repository at 2am while your cost dashboard quietly catches fire.

Empire LLM for Codex takes the opposite bet. Codex stays the lead. The plugin routes a bounded request through OpenRouter, applies capability / privacy / availability / cost policies, and brings back a response with its provenance and cost visible. Codex then decides what — if anything — to do with it. The external model cannot edit the project, cannot execute code, cannot approve its own proposal, and cannot silently merge a result. That boundary is the entire product.

That is the part worth celebrating. It is also rare.

The chaos this is replacing

Developers already ask multiple AI models for help. The workflow looks like this:

  1. Copy a diff into another chat
  2. Ask a different model to challenge the architecture
  3. Compare answers
  4. Return to the original coding environment and decide what to trust

That workflow is useful. It is also informal in every way that matters. The evidence sent to each model is inconsistent. Model selection relies on reputation rather than current capability. Cost only becomes clear after the call. Provider substitutions are invisible. And the line between advice and implementation authority blurs every time you paste a suggestion back into the editor.

Empire LLM for Codex formalises exactly this loop. Codex defines a focused request and selects the minimum useful context. The plugin applies the policies. The response comes back bounded and labelled. Codex evaluates and decides.

That is a meaningful upgrade over copy-paste-between-tabs:

Informal multi-model review Empire LLM for Codex
Context selection is ad hoc Codex picks the minimum useful context
Model choice is reputation-driven Capability / availability / cost policy applied
Cost shows up after the call Cost is visible on the response
Provenance is your memory Provenance travels with the response
Authority and advice blur Authority stays with Codex

What "evidence, not authority" actually enforces

The principle sounds like marketing copy until you read what the plugin blocks. From the plugin's own framing in Empire LLM for Codex: AI Code Review Without Agent Chaos, the external model:

  • cannot edit the project
  • cannot execute code
  • cannot approve its own proposal
  • cannot silently merge a result

That is four explicit refusals. Each one closes a real failure mode that has cost real teams real money. Silent merges from over-permissioned agents, runaway execution from "helpful" bots, and self-approving patches that look reviewed because a model produced them — all four are blocked at the boundary.

The implementation shape that makes this enforceable is straightforward:

// Codex stays the decision-maker
const task = codex.defineTask({
  intent: "review this diff for race conditions",
  context: codex.minimumUsefulContext(diff),
});

// Plugin routes through OpenRouter under explicit policy
const opinion = await empire.route({
  task,
  policies: {
    capability:   ["reasoning", "code-review"],
    privacy:      "no-repo-contents",
    availability: "primary-or-failover",
    cost:         { perCallCeilingUsd: 0.05 },
  },
});

// Empire returns evidence with provenance + cost
const receipt = {
  provider:  opinion.provider,   // actual OpenRouter route taken
  model:     opinion.model,      // which model actually answered
  tokens:    opinion.usage,
  costUsd:   opinion.cost,
  citations: opinion.evidenceRefs,
  proposal:  opinion.text,
};

// Codex decides — never the external model
const decision = codex.evaluate(receipt);
if (decision.accepted) codex.apply(decision.patch);
Enter fullscreen mode Exit fullscreen mode

The exact field names may vary in your install, but the shape is the point: the request is bounded, the response is bounded, the cost is visible, and the authority to mutate lives in exactly one place.

[[DIAGRAM: Codex defines task and minimum context → plugin routes request through OpenRouter under policy → external model returns bounded response with provenance and cost → Codex evaluates receipt and decides what to apply]]

How to actually use this today

If you already run Codex as your coding agent, the plugin fits the workflow you already have. Three concrete steps get you a working first review.

1. Install the plugin alongside Codex. It plugs into the Codex surface you already use, not replaces it. Codex remains your editor, your committer, and your reviewer of record.

2. Define a task with minimum context. The cost and quality of any external review is dominated by what you send in. Treat the request payload like a prompt you would hand to a senior reviewer: the diff, the relevant files, the question you actually want answered, and nothing else. Smaller context = cheaper call = better answer.

3. Read the receipt before you act. Every external response comes back with provider, model, token usage, cost, and the evidence the model cited. Treat that receipt the way you would treat a code comment from a contractor: useful, attributed, but never authoritative.

The governed-media-generation piece is the other half worth noting. External models can produce diagrams, mock-ups, and reference images — useful artefacts, but the kind of thing that historically slips past review because it "looks like a design." Empire treats generated media the same way it treats text suggestions: produced, labelled, returned, and decided on by Codex. The pipeline does not quietly drop a generated diagram into your assets folder.

The deeper pattern: more models is not more intelligence

The plugin's framing is sharper than most launch posts: more models do not automatically produce more intelligence. Without boundaries they produce more cost, more exposure, and more ambiguity.

That is the line to keep. Every six months a new flagship model ships, a new "agentic" wrapper lands, and a new tool promises to coordinate them. Most of them work. Some of them are genuinely impressive. The thing that does not change across any of that churn is the boundary you draw between advice and authority — and the artefact you actually ship.

This is where a controlled review pipeline and a stable cross-platform component layer stop competing and start composing. While the model layer rotates underneath you, the part your users touch should look and behave the same on web, iOS, and Android — one API, one set of components, one design language. That is the durable layer that does not depend on which model reviewed your last PR. The OTF component kit plays exactly this role: it sits underneath whichever AI tool shipped this week and stays standing when the next one ships next month.

Use Empire LLM for Codex to keep the intelligence layer honest. Use a cross-platform UI layer to keep the shipping layer boring. The boring part is the part your users remember.

What to watch

The plugin ships three boundaries that are easy to under-appreciate until you need them: bounded request scope, provenance on every response, and explicit refusal to grant repository authority. The combination is what separates a useful second opinion from a coworker you cannot fire.

The honest gap: there are no public benchmarks yet for review quality, false-positive rate on adversarial diffs, or cost variance across providers. That is the thing to watch. For now the architectural choice — Codex as lead, external model as evidence — is the part that does not depend on any single benchmark number.

If you are already pulling multiple models into your Codex loop, this is the cleanest way to do it without granting any of them the keys.

Top comments (0)