@extends('layouts.layoutMaster') @section('title', __('Provider Details')) @section('vendor-style') @vite([ 'resources/assets/vendor/libs/apex-charts/apex-charts.scss', 'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss' ]) @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/apex-charts/apexcharts.js', 'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js' ]) @endsection @section('page-script') @vite(['Modules/AICore/resources/assets/js/aicore-provider-details.js']) @endsection @section('content')
{{-- Breadcrumb Component --}} {{-- Provider Header --}}
@switch($provider->type) @case('openai') @break @case('claude') @break @case('gemini') @break @default @endswitch

{{ $provider->name }}

{{ $provider->is_active ? __('Active') : __('Inactive') }} {{ ucfirst($provider->type) }} {{ __('Priority') }} {{ $provider->priority }}

{{ __('Added on :date', ['date' => $provider->created_at->format('M d, Y')]) }} • {{ __('Last updated :date', ['date' => $provider->updated_at->diffForHumans()]) }}

{{ __('Edit') }}
{{-- Configuration Details --}}
{{ __('Configuration') }}

{{ $provider->endpoint_url ?: __('Default') }}

{{ $provider->max_requests_per_minute }} {{ __('requests/minute') }}

{{ number_format($provider->max_tokens_per_request) }} {{ __('tokens/request') }}

${{ number_format($provider->cost_per_token, 8) }}

@if($provider->api_key_encrypted) {{ __('Configured') }} @else {{ __('Not Set') }} @endif

{{-- Usage Statistics --}}
{{ __('Usage Statistics') }}
@if(isset($usageStats) && !empty($usageStats))

{{ number_format($usageStats['total_requests'] ?? 0) }}

{{ __('Total Requests') }}

{{ number_format($usageStats['total_tokens'] ?? 0) }}

{{ __('Total Tokens') }}

${{ number_format($usageStats['total_cost'] ?? 0, 2) }}

{{ __('Total Cost') }}

{{ number_format($usageStats['avg_response_time'] ?? 0) }}ms

{{ __('Avg Response') }}
@else

{{ __('No usage data available for this provider yet') }}

@endif
{{-- Models Table --}}
{{ __('AI Models') }} ({{ $provider->models->count() }})
{{ __('Add Model') }}
@if($provider->models->count() > 0)
@foreach($provider->models as $model) @endforeach
{{ __('Model Name') }} {{ __('Identifier') }} {{ __('Type') }} {{ __('Max Tokens') }} {{ __('Input Cost') }} {{ __('Output Cost') }} {{ __('Streaming') }} {{ __('Status') }} {{ __('Actions') }}
{{ $model->name }}
ID: {{ $model->id }}
{{ $model->model_identifier }} {{ ucfirst($model->type) }} {{ number_format($model->max_tokens) }} ${{ number_format($model->cost_per_input_token, 8) }} ${{ number_format($model->cost_per_output_token, 8) }} @if($model->supports_streaming) {{ __('Yes') }} @else {{ __('No') }} @endif @if($model->is_active) {{ __('Active') }} @else {{ __('Inactive') }} @endif
@else

{{ __('No models configured for this provider') }}

{{ __('Add First Model') }}
@endif
{{-- Page Data for JavaScript --}} @endsection