feat: Add OpenRouter as third LLM provider#11
feat: Add OpenRouter as third LLM provider#11becker-charles wants to merge 1 commit intowillchen96:mainfrom
Conversation
Add OpenRouter support alongside Claude and Gemini, providing access to GPT-5.3, Claude 4.x, Grok 4.3, and GPT-4o Mini via OpenRouter's unified API. Backend: - Add OpenRouter streaming implementation (openrouter.ts) - Add provider type and model definitions - Route OpenRouter calls in LLM index - Include openrouter_api_key in user settings queries Frontend: - Add OpenRouter models to ModelToggle - Add OpenRouter API key input in Account → Models - Update model availability checks for OpenRouter provider Database: - Add migration for openrouter_api_key column - Update one-shot schema for fresh deployments
ff1e1db to
bb05dd7
Compare
|
@willchen96 could not find contributors file. perhaps worth standardizing a format. great project, nonetheless! |
|
Thanks Charles for the suggestion and for putting this together. I’m going to hold off on merging OpenRouter support for now because the main branch has changed significantly due to recent security updates, especially around API key handling, backend-owned data access, and model/provider configuration. I don’t want to merge provider changes on top of an older structure and risk reintroducing inconsistencies. OpenRouter support is still something I’d like to add later, but I’d prefer to do it against the updated provider/key architecture so it fits cleanly with the current model settings and security model. Closing this for now, but I appreciate the contribution. |
Summary
Adds OpenRouter as a third LLM provider alongside Claude and Gemini, providing access to GPT-5.3, GPT-4o Mini, Claude Sonnet/Opus 4.x, and Grok 4.3 via OpenRouter's unified API.
Changes
Backend:
openrouter.tsstreaming implementation using OpenAI-compatible APIopenrouter_api_keyin user settings queriesFrontend:
Database:
001_add_openrouter_api_key.sqlfor existing deploymentsModels Added
Test Plan (Fully Completed, Passed)