@extends('layouts.admin') @section('title', __('AI providers')) @section('content')

{{ __('AI providers') }}

{{ __('Traffic controls') }}

{{ __('These global values come from environment/config and shape queueing, cooldowns, and uptime behavior.') }}

  • {{ __('Max concurrent AI requests') }}: {{ $queueConfig['max_concurrent'] ?? '—' }}
  • {{ __('Queue wait limit') }}: {{ $queueConfig['max_wait_seconds'] ?? '—' }}s
  • {{ __('Provider failure threshold') }}: {{ $healthConfig['provider_failure_threshold'] ?? '—' }}
  • {{ __('Provider cooldown') }}: {{ $healthConfig['provider_cooldown_seconds'] ?? '—' }}s
  • {{ __('Key cooldown') }}: {{ $healthConfig['key_cooldown_seconds'] ?? '—' }}s

{{ __('Add provider') }}

@csrf
@if($providers->isEmpty())
{{ __('Run migrations first to manage AI providers here.') }}
@endif @foreach($providers as $provider)
{{ $provider->name }} ({{ $provider->slug }})
{{ __('Health') }}: {{ $provider->health_status }} @if($provider->cooldown_until) | {{ __('Cooldown until') }}: {{ $provider->cooldown_until }} @endif
@csrf @method('put')
enabled)>
supports_streaming)>

{{ __('API keys') }}

@foreach($provider->keys as $key) @php $rawKey = (string) $key->api_key; $masked = strlen($rawKey) > 8 ? substr($rawKey, 0, 4).'…'.substr($rawKey, -4) : '********'; @endphp @endforeach
{{ __('Name') }} {{ __('Priority') }} {{ __('Masked key') }} {{ __('Enabled') }} {{ __('Last error') }} {{ __('Rate limited until') }}
{{ $key->name }} {{ $key->priority }} {{ $masked }} {{ $key->enabled ? __('Yes') : __('No') }} {{ $key->last_error_code ?: '—' }} {{ $key->rate_limited_until ?: '—' }}
@csrf
@foreach($provider->keys as $key)
@csrf @method('put')
enabled)>
@endforeach
@endforeach @endsection