provider !== null && $this->provider !== '') { config(['ai_biography.provider_override' => $this->provider]); config(['ai_biography.provider' => $this->provider]); } $user = User::query() ->where('id', $this->userId) ->where('is_active', true) ->whereNull('deleted_at') ->first(); if ($user === null) { Log::warning('GenerateAiBiographyJob: user not found or inactive', ['user_id' => $this->userId]); return; } $result = $biographyService->regenerate($user, $this->force); if (! $result['success']) { Log::warning('GenerateAiBiographyJob: generation failed', [ 'user_id' => $this->userId, 'action' => $result['action'], 'errors' => $result['errors'], 'provider' => $this->provider, ]); } } }