@extends('layouts.layoutMaster') @section('title', __('Edit AI Provider')) @section('vendor-style') @vite([ 'resources/assets/vendor/libs/@form-validation/form-validation.scss', 'resources/assets/vendor/libs/select2/select2.scss' ]) @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/@form-validation/popular.js', 'resources/assets/vendor/libs/@form-validation/bootstrap5.js', 'resources/assets/vendor/libs/@form-validation/auto-focus.js', 'resources/assets/vendor/libs/select2/select2.js' ]) @endsection @section('page-script') @vite(['Modules/AICore/resources/assets/js/aicore-provider-form.js']) {{-- Include Gemini-specific assets if GeminiAIProvider module is enabled --}} @if(isset($geminiProviderEnabled) && $geminiProviderEnabled) @endif @endsection @section('content')
{{-- Breadcrumb Component --}} {{-- Demo Warning --}} {{ __('AI provider settings cannot be modified in demo mode.') }}
{{ __('Edit Provider: :name', ['name' => $provider->name]) }}
{{ $provider->is_active ? __('Active') : __('Inactive') }} {{ ucfirst($provider->type) }}
@csrf @method('PUT') {{-- Basic Information --}}
@error('name')
{{ $message }}
@enderror
@error('type')
{{ $message }}
@enderror
{{-- API Configuration --}}
@error('api_key')
{{ $message }}
@enderror {{ __('Leave empty to keep current API key. Current key is encrypted and hidden for security.') }}
@error('endpoint_url')
{{ $message }}
@enderror
{{-- Rate Limiting --}}
@error('max_requests_per_minute')
{{ $message }}
@enderror
@error('max_tokens_per_request')
{{ $message }}
@enderror
@error('cost_per_token')
{{ $message }}
@enderror
{{-- Settings --}}
@error('priority')
{{ $message }}
@enderror
is_active) ? 'checked' : '' }}>
{{-- Submit Buttons --}}
{{ __('Back to Providers') }}
{{-- Provider Stats --}}
{{ __('Provider Statistics') }}
{{ __('Models') }} {{ $provider->models->count() }}
{{ __('Active Models') }} {{ $provider->models->where('is_active', true)->count() }}
{{ __('Created') }} {{ $provider->created_at->format('M d, Y') }}
{{ __('Last Updated') }} {{ $provider->updated_at->format('M d, Y') }}
{{-- Models Quick View --}} @if($provider->models->count() > 0)
{{ __('Associated Models') }}
{{ __('Manage') }}
@foreach($provider->models->take(5) as $model)
{{ $model->name }}
{{ ucfirst($model->type) }}
{{ $model->is_active ? __('Active') : __('Inactive') }}
@endforeach @if($provider->models->count() > 5)
{{ __('and :count more models', ['count' => $provider->models->count() - 5]) }}
@endif
@endif {{-- Quick Actions --}}
{{ __('Quick Actions') }}
{{-- Page Data for JavaScript --}} @endsection