diff --git a/README.md b/README.md
index 0afea2cf..533d516f 100644
--- a/README.md
+++ b/README.md
@@ -67,9 +67,15 @@ npm run setup
**Currently Supporting:**
-- OpenAI API: Get OpenAI API Key [here](https://platform.openai.com/api-keys)
-- Gemini API: Get Gemini API Key [here](https://aistudio.google.com/apikey)
-- Local LLM Ollama & Whisper
+
+- **OpenAI API**: Get your API Key [here](https://platform.openai.com/api-keys).
+- **Gemini API**: Get your API Key [here](https://aistudio.google.com/apikey).
+- **Local LLM (Ollama & Whisper).**
+- **Anthropic API**: Get your API Key [here](https://console.anthropic.com/dashboard).
+- **OpenRouter API (new)**: Supports models like **Grok 4, Claude 4 Sonnet, Gemini 2.5 Flash, GPT-4.1, LLaMA 4 Maverick** using your **OpenRouter API key**.
+ Get your API key [here](https://openrouter.ai/settings/keys).
+
+> Note: OpenRouter does not currently support native STT; use OpenAI or Gemini for speech-to-text.
### Liquid Glass Design (coming soon)
diff --git a/src/features/common/ai/factory.js b/src/features/common/ai/factory.js
index 419cfdfa..b289328e 100644
--- a/src/features/common/ai/factory.js
+++ b/src/features/common/ai/factory.js
@@ -49,6 +49,18 @@ const PROVIDERS = {
{ id: 'gemini-live-2.5-flash-preview', name: 'Gemini Live 2.5 Flash' }
],
},
+ 'openrouter': {
+ name: 'OpenRouter',
+ handler: () => require("./providers/openrouter"),
+ llmModels: [
+ { id: 'x-ai/grok-4', name: 'xAI Grok 4'},
+ { id: 'anthropic/claude-sonnet-4', name: 'Anthropic Claude Sonnet(OpenRouter)' },
+ { id: 'google/gemini-2.5-flash', name: 'Google Gemini 2.5 Flash(OpenRouter)' },
+ { id: 'openai/gpt-4.1', name: 'OpenAI GPT-4.1(OpenRouter)' },
+ { id: 'meta-llama/llama-4-maverick', name: 'Meta Llama 4 Maverick(OpenRouter)' },
+ ],
+ sttModels: [],
+ },
'anthropic': {
name: 'Anthropic',
handler: () => require("./providers/anthropic"),
@@ -158,7 +170,8 @@ function getProviderClass(providerId) {
'gemini': 'GeminiProvider',
'deepgram': 'DeepgramProvider',
'ollama': 'OllamaProvider',
- 'whisper': 'WhisperProvider'
+ 'whisper': 'WhisperProvider',
+ 'openrouter': 'OpenRouterProvider'
};
const className = classNameMap[actualProviderId];
diff --git a/src/features/common/ai/providers/openrouter.js b/src/features/common/ai/providers/openrouter.js
new file mode 100644
index 00000000..70d04628
--- /dev/null
+++ b/src/features/common/ai/providers/openrouter.js
@@ -0,0 +1,191 @@
+const OpenAI = require('openai');
+
+const OPENROUTER_BASE_URL = 'https://openrouter.ai/api/v1';
+
+class OpenRouterProvider {
+ static async validateApiKey(key) {
+ if (!key || typeof key !== 'string' || !key.startsWith('sk-or-')) {
+ return { success: false, error: 'Invalid OpenRouter API key format.' };
+ }
+
+ try {
+ const response = await fetch(`${OPENROUTER_BASE_URL}/models`, {
+ headers: { 'Authorization': `Bearer ${key}` }
+ });
+
+ if (response.ok) {
+ return { success: true };
+ } else {
+ const errorData = await response.json().catch(() => ({}));
+ const message = errorData.error?.message || `Validation failed with status: ${response.status}`;
+ return { success: false, error: message };
+ }
+ } catch (error) {
+ console.error(`[OpenRouterProvider] Network error during key validation:`, error);
+ return { success: false, error: 'A network error occurred during validation.' };
+ }
+ }
+}
+
+/**
+ * Creates an OpenRouter STT session
+ * Note: OpenRouter doesn't have native real-time STT, so this is a placeholder
+ * @param {object} opts - Configuration options
+ * @param {string} opts.apiKey - OpenRouter API key
+ * @param {string} [opts.language='en'] - Language code
+ * @param {object} [opts.callbacks] - Event callbacks
+ * @returns {Promise