---
title: "Multi-Model Code Auditing: The Council Pattern"
description: "A multi-model audit of 5,000 lines of TypeScript found 15 unique problems for $1.20. This is how I ran it, merged the results, and checked them."
date: "2026-02-11T00:00:00.000Z"
author: "Carlos Garavito"
tags: ["ai", "agents", "llm", "architecture", "security"]
canonical_url: "https://cgaravito.dev/en/blog/council-of-advisors-multi-model-code-auditing"
last_updated: "2026-02-11T00:00:00.000Z"
locale: "en"
---

I audited a TypeScript AI Gateway with about 5,000 lines across 46 source files. Four models reviewed the same code in parallel, producing 84 findings at a total cost of about $1.20 and a wall time of about two minutes.

After deduplication, 15 findings were unique. Nine appeared in the output of at least three models, and all four models found two critical issues, a missing authentication check and an injection vulnerability in the caching layer.

That result gave me a concrete reason to keep using the council pattern for code audits. Different model families missed different problems, and the overlap helped me decide where to investigate first.

## The audit and its results

I ran these four models:

- **Claude Opus 4.6** at about $0.83
- **Claude Sonnet 4.5** at about $0.25
- **Gemini 3 Pro** at about $0.08
- **Kimi K2.5** at about $0.04

| Model | Findings | Unique | Cost |
|-------|----------|--------|------|
| Opus 4.6 | 21 | 5 | $0.83 |
| Sonnet 4.5 | 27 | 5 | $0.25 |
| Gemini 3 Pro | 11 | 2 | $0.08 |
| Kimi K2.5 | 25 | 3 | $0.04 |
| **Total** | **84** | **15** | **$1.20** |

Kimi, the cheapest run at $0.04, found a critical SSRF vulnerability that the other three missed. Gemini found a cost leak that neither Anthropic model reported. Opus was the only model that explored files beyond the initial prompt, while the others stayed within the explicit scope. Gemini returned 11 relevant findings with the least noise, and Sonnet returned more findings with more overlap.

The models also disagreed on severity. Opus and Gemini rated a memory growth issue as medium, while Sonnet and Kimi rated it critical. The labels depended on assumptions about expected traffic, so I had to check those assumptions against the system.

I found no false positives in this run. Every finding was legitimate, although their urgency varied. Another codebase can produce a different result, so consensus remains a signal to investigate.

## Why several models can add coverage

Each model inherits blind spots from its training, architecture, and optimization. In practice, I have seen Claude do well on data flow and architecture, GPT catch common security patterns, Gemini handle mathematical reasoning efficiently, and Kimi or DeepSeek surface issues the other training corpora did not. These are working observations that I expect to change as models change.

The academic reference for this approach is the 2024 paper [Mixture-of-Agents Enhances Large Language Model Capabilities](https://arxiv.org/abs/2406.04692) by Wang et al. Its architecture combined models weaker than the strongest individual model and scored 65.1% on AlpacaEval 2.0, compared with 57.5% for GPT-4o.

For code review, I use the same basic mechanism. Every model receives the same prompt and code, then a separate pass deduplicates and prioritizes the findings. Agreement raises the priority of an investigation, while a finding from one model may be either a useful edge case or a wrong reading of the code. Both still need human verification.

## Running the council

This simplified OpenClaw and OpenCode example launches the four reviews in parallel.

```bash
# Same prompt, 4 models, parallel execution
PROMPT=$(cat audit-prompt.md source-code.txt)

opencode run --model anthropic/claude-opus-4-6 --agent coder "$PROMPT" &
opencode run --model anthropic/claude-sonnet-4-5 --agent coder "$PROMPT" &
opencode run --model google/gemini-3-pro-preview --agent coder "$PROMPT" &
opencode run --model opencode/kimi-k2.5-free --agent coder "$PROMPT" &
wait
```

I used a fifth model, another Claude Opus, to deduplicate and prioritize the 84 raw findings. The synthesis was the expensive part in attention, because repeated descriptions still had to be merged without losing distinct evidence or inflating severity.

Four diverse models were enough for this audit. Each contributed about three to five unique findings, and I would expect the return from a fifth reviewer to drop to one or two, based on this result. I wanted coverage across model families because those differences produced the SSRF and cost findings here.

The council gives me a ranked investigation queue. Shipping still requires tracing every security finding to the code, reproducing it when possible, and checking the report against the runtime.

---

*Built with [OpenClaw](https://openclaw.ai) for orchestration and [OpenCode](https://opencode.ai) for model execution. The council audit pattern works with other provider setups.*
