<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\AiProvider;

class AiProviderSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $providers = [
            [
                'provider_key' => 'google-gemini',
                'provider_name' => 'Google Gemini 2.5 Flash',
                'api_endpoint' => 'https://generativelanguage.googleapis.com/v1/models/',
                'api_key' => null, 
                'default_model' => 'gemini-2.5-flash',
                'notes' => 'Google\'s fast and cost-effective multimodal model. Requires a Google AI Studio API Key.',
                'priority' => 10,
                'is_enabled' => true,
                'is_active' => true,
            ],
            [
                'provider_key' => 'deepseek',
                'provider_name' => 'DeepSeek Coder V2',
                'api_endpoint' => 'https://api.deepseek.com/v1/chat/completions',
                'api_key' => null,
                'default_model' => 'deepseek-chat',
                'notes' => 'A powerful open-source model specialized in coding tasks. Accessible via an OpenAI-compatible API.',
                'priority' => 20,
                'is_enabled' => true,
                'is_active' => false,
            ]
        ];

        foreach ($providers as $provider) {
            AiProvider::updateOrCreate(
                ['provider_key' => $provider['provider_key']],
                $provider
            );
        }
    }
}