Description
Add OpenRouter as a provider, giving access to 100+ models through a single API key.
Implementation
- Create
src/agent/clients/openrouter_client.py extending BaseLLMClient
- OpenRouter uses the OpenAI-compatible API format
- Add popular model mappings to factory.py
- Handle the
HTTP-Referer and X-Title headers that OpenRouter recommends
Reference
Description
Add OpenRouter as a provider, giving access to 100+ models through a single API key.
Implementation
src/agent/clients/openrouter_client.pyextendingBaseLLMClientHTTP-RefererandX-Titleheaders that OpenRouter recommendsReference