From 4c7afe32b40119a8786ea0bd9e60f5503ceac32f Mon Sep 17 00:00:00 2001 From: John Rallis Date: Fri, 31 Jul 2026 16:45:31 +0300 Subject: [PATCH] add openrouter to eligible ai providers --- app/Ai/Agents/BrandAnalyzer.php | 1 + app/Ai/Agents/PostContentGenerator.php | 1 + app/Ai/Agents/PostContentHumanizer.php | 1 + app/Ai/Agents/PostContentReviewer.php | 1 + app/Ai/Agents/PostContentStreamer.php | 1 + app/Ai/Agents/PostImageRegenerator.php | 1 + app/Services/Brand/BrandAnalyzerRunner.php | 1 + 7 files changed, 7 insertions(+) diff --git a/app/Ai/Agents/BrandAnalyzer.php b/app/Ai/Agents/BrandAnalyzer.php index c1df86cd5..86de1e7e9 100644 --- a/app/Ai/Agents/BrandAnalyzer.php +++ b/app/Ai/Agents/BrandAnalyzer.php @@ -32,6 +32,7 @@ public function provider(): Lab return match (config('ai.default')) { 'openai' => Lab::OpenAI, 'anthropic' => Lab::Anthropic, + 'openrouter' => Lab::OpenRouter, default => Lab::Gemini, }; } diff --git a/app/Ai/Agents/PostContentGenerator.php b/app/Ai/Agents/PostContentGenerator.php index 14a82146e..7567474fc 100644 --- a/app/Ai/Agents/PostContentGenerator.php +++ b/app/Ai/Agents/PostContentGenerator.php @@ -115,6 +115,7 @@ public function provider(): Lab return match (config('ai.default')) { 'openai' => Lab::OpenAI, 'anthropic' => Lab::Anthropic, + 'openrouter' => Lab::OpenRouter, default => Lab::Gemini, }; } diff --git a/app/Ai/Agents/PostContentHumanizer.php b/app/Ai/Agents/PostContentHumanizer.php index 36eb57019..b68ab3e59 100644 --- a/app/Ai/Agents/PostContentHumanizer.php +++ b/app/Ai/Agents/PostContentHumanizer.php @@ -78,6 +78,7 @@ public function provider(): Lab return match (config('ai.default')) { 'openai' => Lab::OpenAI, 'anthropic' => Lab::Anthropic, + 'openrouter' => Lab::OpenRouter, default => Lab::Gemini, }; } diff --git a/app/Ai/Agents/PostContentReviewer.php b/app/Ai/Agents/PostContentReviewer.php index 6bf6252c0..787814eb6 100644 --- a/app/Ai/Agents/PostContentReviewer.php +++ b/app/Ai/Agents/PostContentReviewer.php @@ -49,6 +49,7 @@ public function provider(): Lab return match (config('ai.default')) { 'openai' => Lab::OpenAI, 'anthropic' => Lab::Anthropic, + 'openrouter' => Lab::OpenRouter, default => Lab::Gemini, }; } diff --git a/app/Ai/Agents/PostContentStreamer.php b/app/Ai/Agents/PostContentStreamer.php index 3bd800e15..ca868259a 100644 --- a/app/Ai/Agents/PostContentStreamer.php +++ b/app/Ai/Agents/PostContentStreamer.php @@ -47,6 +47,7 @@ public function provider(): Lab return match (config('ai.default')) { 'openai' => Lab::OpenAI, 'anthropic' => Lab::Anthropic, + 'openrouter' => Lab::OpenRouter, default => Lab::Gemini, }; } diff --git a/app/Ai/Agents/PostImageRegenerator.php b/app/Ai/Agents/PostImageRegenerator.php index 5fe2edc4e..62f358f18 100644 --- a/app/Ai/Agents/PostImageRegenerator.php +++ b/app/Ai/Agents/PostImageRegenerator.php @@ -53,6 +53,7 @@ public function provider(): Lab return match (config('ai.default')) { 'openai' => Lab::OpenAI, 'anthropic' => Lab::Anthropic, + 'openrouter' => Lab::OpenRouter, default => Lab::Gemini, }; } diff --git a/app/Services/Brand/BrandAnalyzerRunner.php b/app/Services/Brand/BrandAnalyzerRunner.php index 2eae3e1c0..2908af92a 100644 --- a/app/Services/Brand/BrandAnalyzerRunner.php +++ b/app/Services/Brand/BrandAnalyzerRunner.php @@ -19,6 +19,7 @@ public function isAvailable(): bool return match (config('ai.default')) { 'openai' => ! empty(config('services.openai.api_key')), 'gemini' => ! empty(config('services.gemini.api_key')), + 'openrouter' => ! empty(config('services.openrouter.api_key')), default => false, }; }