From 0da640c0df3c20fba74e68ebc7494ce1b67e3a3b Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Sat, 11 Apr 2026 20:54:32 +0200 Subject: [PATCH] feat(ai): default to Claude Sonnet 4.6 / Haiku 4.5, refresh model list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sets the default AI chat model to anthropic/claude-sonnet-4.6 and the default text-generation (WYSIWYG writing) model to anthropic/claude- haiku-4.5 across all three layers where defaults live: the backend hydrateDefaults() fallback in AiConfigurationService, the frontend createDefaults() in AiConfigurationForm, and the docblock example in AiTextGenerationService. Refreshes the DriverRegistryProvider suggested-model list to only include recent models from Anthropic (Sonnet 4.6, Haiku 4.5, Opus 4.6), OpenAI (GPT-5.4, GPT-5.4 mini), Google (Gemini 3.1 Pro preview, Gemini 3.1 Flash Lite preview) and Z.AI (GLM 5.1, GLM 4.7 Flash). Drops GPT-4o, Claude 3.5, Gemini 1.5 and Llama 3.3. The underlying config still accepts any OpenRouter model ID, so the suggested list is purely a UX surface — existing companies with a custom ai_chat_model retain their value untouched. --- app/Providers/DriverRegistryProvider.php | 15 +++++++++------ app/Services/Ai/AiTextGenerationService.php | 4 ++-- app/Services/AiConfigurationService.php | 4 ++-- .../settings/components/AiConfigurationForm.vue | 4 ++-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/Providers/DriverRegistryProvider.php b/app/Providers/DriverRegistryProvider.php index d504007b..122e5c45 100644 --- a/app/Providers/DriverRegistryProvider.php +++ b/app/Providers/DriverRegistryProvider.php @@ -74,12 +74,15 @@ class DriverRegistryProvider extends ServiceProvider 'default_base_url' => 'https://openrouter.ai/api/v1', 'supported_roles' => ['chat', 'text_generation'], 'suggested_models' => [ - ['value' => 'openai/gpt-4o', 'label' => 'OpenAI GPT-4o'], - ['value' => 'openai/gpt-4o-mini', 'label' => 'OpenAI GPT-4o mini'], - ['value' => 'anthropic/claude-3.5-sonnet', 'label' => 'Anthropic Claude 3.5 Sonnet'], - ['value' => 'anthropic/claude-3.5-haiku', 'label' => 'Anthropic Claude 3.5 Haiku'], - ['value' => 'google/gemini-pro-1.5', 'label' => 'Google Gemini Pro 1.5'], - ['value' => 'meta-llama/llama-3.3-70b-instruct', 'label' => 'Meta Llama 3.3 70B'], + ['value' => 'anthropic/claude-sonnet-4.6', 'label' => 'Anthropic Claude Sonnet 4.6'], + ['value' => 'anthropic/claude-haiku-4.5', 'label' => 'Anthropic Claude Haiku 4.5'], + ['value' => 'anthropic/claude-opus-4.6', 'label' => 'Anthropic Claude Opus 4.6'], + ['value' => 'openai/gpt-5.4', 'label' => 'OpenAI GPT-5.4'], + ['value' => 'openai/gpt-5.4-mini', 'label' => 'OpenAI GPT-5.4 mini'], + ['value' => 'google/gemini-3.1-pro-preview', 'label' => 'Google Gemini 3.1 Pro (preview)'], + ['value' => 'google/gemini-3.1-flash-lite-preview', 'label' => 'Google Gemini 3.1 Flash Lite (preview)'], + ['value' => 'z-ai/glm-5.1', 'label' => 'Z.AI GLM 5.1'], + ['value' => 'z-ai/glm-4.7-flash', 'label' => 'Z.AI GLM 4.7 Flash'], ], 'config_fields' => [ [ diff --git a/app/Services/Ai/AiTextGenerationService.php b/app/Services/Ai/AiTextGenerationService.php index 0cb441eb..1c5db25e 100644 --- a/app/Services/Ai/AiTextGenerationService.php +++ b/app/Services/Ai/AiTextGenerationService.php @@ -18,8 +18,8 @@ use App\Support\Ai\AiException; * - ai_text_generation_model picks which model to use * * That means an instance can use a cheap fast model for one-shot writing - * (openai/gpt-4o-mini) while pointing chat at a smarter model - * (openai/gpt-4o) without config gymnastics. + * (anthropic/claude-haiku-4.5) while pointing chat at a smarter model + * (anthropic/claude-sonnet-4.6) without config gymnastics. */ class AiTextGenerationService { diff --git a/app/Services/AiConfigurationService.php b/app/Services/AiConfigurationService.php index 2e172a31..f976c3c4 100644 --- a/app/Services/AiConfigurationService.php +++ b/app/Services/AiConfigurationService.php @@ -302,9 +302,9 @@ class AiConfigurationService 'ai_api_key' => '', 'ai_base_url' => '', 'ai_chat_enabled' => 'NO', - 'ai_chat_model' => 'openai/gpt-4o', + 'ai_chat_model' => 'anthropic/claude-sonnet-4.6', 'ai_text_generation_enabled' => 'NO', - 'ai_text_generation_model' => 'openai/gpt-4o-mini', + 'ai_text_generation_model' => 'anthropic/claude-haiku-4.5', ], $settings); } diff --git a/resources/scripts/features/company/settings/components/AiConfigurationForm.vue b/resources/scripts/features/company/settings/components/AiConfigurationForm.vue index 7b6df26b..0d9144ea 100644 --- a/resources/scripts/features/company/settings/components/AiConfigurationForm.vue +++ b/resources/scripts/features/company/settings/components/AiConfigurationForm.vue @@ -95,9 +95,9 @@ function createDefaults(): AiConfig { ai_api_key: '', ai_base_url: '', ai_chat_enabled: 'NO', - ai_chat_model: 'openai/gpt-4o', + ai_chat_model: 'anthropic/claude-sonnet-4.6', ai_text_generation_enabled: 'NO', - ai_text_generation_model: 'openai/gpt-4o-mini', + ai_text_generation_model: 'anthropic/claude-haiku-4.5', } }