LLM Council intentionally keeps its configuration minimal and centralized. Almost everything you need to change lives in two files:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/karpathy/llm-council/llms.txt
Use this file to discover all available pages before exploring further.
backend/config.py for model and storage settings, and .env in the project root for secrets. The sections below explain each option, where it lives, and what to watch out for when changing it.
backend/config.py
This file is the single source of truth for which models sit on the council, which model acts as Chairman, where conversations are saved, and which OpenRouter endpoint is used. Open it in any editor to make changes.
backend/config.py
Configuration Variables
A Python list of OpenRouter model identifier strings. Every model in this list participates in Stage 1 (answering the query) and Stage 2 (peer-reviewing the other answers). The number of council members directly determines how many parallel API requests are made per message and how rich the cross-review will be.The default council is:
openai/gpt-5.1google/gemini-3-pro-previewanthropic/claude-sonnet-4.5x-ai/grok-4
The OpenRouter model identifier for the Chairman — the model that runs Stage 3 and synthesizes the final answer from all council responses and peer-review feedback. The Chairman can be the same model as one of the council members (the default uses
google/gemini-3-pro-preview for both) or a completely different model. Choose a model known for strong summarization and instruction-following.Loaded at startup from the
.env file via python-dotenv. This key authenticates all requests to the OpenRouter API. It is never hardcoded in config.py or any other source file — the line OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY") will return None if the .env file is absent or the variable is not set, causing every model query to fail.The full URL of the OpenRouter chat completions endpoint:
https://openrouter.ai/api/v1/chat/completions. This follows the OpenAI-compatible API shape, so the same endpoint is used for every model regardless of the underlying provider. You should rarely if ever need to change this value.The directory path (relative to the project root) where conversation JSON files are written. Defaults to
data/conversations. Each conversation is stored as a separate JSON file named by its UUID. The directory is created automatically if it does not exist. You can change this to any path writable by the process running the backend.Environment File (.env)
Create this file in the project root alongside pyproject.toml:
.env
.env to your .gitignore if it isn’t already there — committing your API key to a public repository will expose it immediately.
Choosing Council Models
CORS Settings
The backend (backend/main.py) configures FastAPI’s CORS middleware to accept requests from two origins by default:
backend/main.py
allow_origins list and restart the backend. Without a matching entry, the browser will block API requests with a CORS error.
Port Configuration
| Service | Default Port | Configured In |
|---|---|---|
| FastAPI backend | 8001 | backend/main.py (uvicorn call at bottom of file) |
| Vite frontend | 5173 | Vite default; referenced in frontend/src/api.js |