Consult multiple top-tier LLMs simultaneously with automated peer review and synthesis. Leverage the "Wisdom of the Crowd" to get high-confidence answers for complex architectural and debugging tasks.
Inspired by Andrej Karpathy's llm-council.
- Gemini CLI installed.
- An OpenRouter API Key.
-
Link the extension:
gemini extensions link . -
Configure API Key: Use the Gemini CLI to set your OpenRouter API key securely. (Note: This requires Gemini CLI v0.24.0-preview or later)
gemini extensions config gemini-llm-council "OpenRouter API Key"Headless / CI Environments: If the system keychain is unavailable, you can set the API key directly in your shell.
[!CAUTION] Security Warning: Using the
GEMINI_CLI_prefix whitelists the variable from redaction.- Leakage: Secrets will appear in plaintext in logs (
~/.gemini/logs/) and error traces. - Lack of Isolation: These variables are global and visible to all installed Gemini extensions.
- Display: These secrets may be displayed in plaintext during verbose output or screen sharing.
Only use this for ephemeral, headless environments (like CI/CD). For local development, always prefer the keychain-backed method.
export GEMINI_CLI_OPENROUTER_API_KEY=sk-or-... - Leakage: Secrets will appear in plaintext in logs (
-
Build the extension:
npm install npm run build
-
Configure Council Members: Run the setup command in your project workspace.
/council:setup
Note: For the best setup experience (interactive selection), this extension supports the
ask_user_questiontool. This tool is inspired by Claude Code's AskUserQuestion and is available in the develop branch of this Gemini CLI fork. If not available, setup will fall back to a text-based workflow.
| Command | Description |
|---|---|
/council:setup |
Select and save your preferred models for the current workspace. |
/council:ask |
Consult the Council on a specific query or task. |
/council:status |
Show active council members and the configuration file path. |
Configurations are project-specific and stored in .gemini/llm-council.json within your project root. This allows you to have a "Fast & Cheap" council for one project and a "God Mode" council for another.
/council:ask "What is the best way to implement a singleton in TypeScript?"The Council can review files or research topics if you ask the Chairman to do so.
/council:ask "Review src/index.ts and suggest improvements."(The Chairman will read the file first, then pass it to the Council).
- Drafting Phase: Selected models provide independent answers.
- Peer Review Phase: Models critique each other's anonymized answers.
- Synthesis: The Gemini CLI Agent (Chairman) synthesizes the drafts and reviews into a final consensus answer, prioritizing catches made during peer review.
This project was inspired by Andrej Karpathy's LLM council project, as shared in his Twitter (X) post.
MIT