OpenRouter vs OpenAI in practice

The real value of the abstraction is being able to evaluate. Run the same five prompts through OpenRouter and OpenAI, record latency, tool-call accuracy, and token cost. You are no longer locked into a vendor decision made on day one.

.env
bash
# Run A: OpenRouter with Gemma
LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=...
OPENROUTER_MODEL=google/gemma-3-12b-it

# Run B: swap to OpenAI
LLM_PROVIDER=openai
OPENAI_API_KEY=...
OPENAI_MODEL=gpt-4o-mini

Flip the env vars, restart the dev server, run the same prompts. No code change, no redeploy logic, no branch. This is the whole point of the abstraction.

Matching exercise: Match each provider choice to its typical strength

Loading practice…

Checkpoint: Provider swap checkpoint

Loading practice…