You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user selects "Open Router", the form must show the following fields:
API Key (Required)
API Address (Optional: Allow users to specify a custom/proxy endpoint instead of the default https://openrouter.ai/api/v1)
HTTP-Referer (Optional: Allow users to specify a custom HTTP-Referer header, as required by some Open Router configurations)
⚙️ Backend Requirements
Modify the "save model" API to store the provider_type: 'OpenRouter' and its associated fields.
The backend logic must check the provider_type for the model.
If the provider_type is "Open Router", the system must route the API call to an llm.openrouter.js client (this client may need to be created or updated).
The llm.openrouter.js client must correctly:
Use the API Key in the Authorization: Bearer [API Key] header.
Target the API Address (or the default Open Router endpoint if not provided).
Include the HTTP-Referer header in the request if one was provided by the user.
✅ Acceptance Criteria
A user can successfully add and save an Open Router API configuration via the UI.
The system can use this configuration to successfully make calls to the Open Router API.
Parent Epic: #56
Depends on: #61 (This issue introduces the "Provider Type" UI)
🎯 Goal
Implement end-to-end support for the Open Router API, allowing users to add it as a custom model provider.
💻 UI Requirements (Frontend)
API Key(Required)API Address(Optional: Allow users to specify a custom/proxy endpoint instead of the defaulthttps://openrouter.ai/api/v1)HTTP-Referer(Optional: Allow users to specify a customHTTP-Refererheader, as required by some Open Router configurations)⚙️ Backend Requirements
provider_type: 'OpenRouter'and its associated fields.provider_typefor the model.provider_typeis "Open Router", the system must route the API call to anllm.openrouter.jsclient (this client may need to be created or updated).llm.openrouter.jsclient must correctly:API Keyin theAuthorization: Bearer [API Key]header.API Address(or the default Open Router endpoint if not provided).HTTP-Refererheader in the request if one was provided by the user.✅ Acceptance Criteria