feat(providers): added openrouter support

This PR is adapted from namanbnsl's original
at https://github.com/namanbnsl/Perplexica/tree/add-openrouter-support

Added minor modifications to bring the openrouter support in line
with the changes in this forked repo
This commit is contained in:
kmac 2025-05-31 21:34:23 -04:00
parent 6422c5b7e0
commit 94315c169a
7 changed files with 108 additions and 0 deletions

View file

@ -39,6 +39,9 @@ interface Config {
LM_STUDIO: {
API_URL: string;
};
OPENROUTER: {
API_KEY: string;
};
CUSTOM_OPENAI: {
API_URL: string;
API_KEY: string;
@ -77,6 +80,8 @@ export const getOpenaiApiKey = () => loadConfig().MODELS.OPENAI.API_KEY;
export const getGroqApiKey = () => loadConfig().MODELS.GROQ.API_KEY;
export const getOpenrouterApiKey = () => loadConfig().MODELS.OPENROUTER.API_KEY;
export const getAnthropicApiKey = () => loadConfig().MODELS.ANTHROPIC.API_KEY;
export const getGeminiApiKey = () => loadConfig().MODELS.GEMINI.API_KEY;