Google AI Feature Module (Provider/GoogleAiModule.php)

synaplan · backend/src/Module/Provider/GoogleAiModule.php · php · Apache-2.0
ai, integration, lang:php

Configures Google AI and Vertex integrations via environment credentials or runtime admin keys. Reuse in applications adding Gemini capabilities.

// Source: https://github.com/metadist/synaplan | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
<?php

declare(strict_types=1);

namespace App\Module\Provider;

use App\AI\Credential\ProviderKeyStore;
use App\Module\Contract\ConfiguredBy;
use App\Module\Contract\FeatureModuleInterface;
use App\Module\Contract\MobileClass;
use App\Module\Contract\ModuleStatus;

/**
 * Google AI (Gemini / Vertex) — provider with three env aliases for the API key
 * plus an admin-entered key in `BCONFIG`.
 *
 * `isConfigured()` follows `ProviderKeyStore::getStatus('google')` so an env
 * key and a key entered at runtime both count, exactly like the provider
 * itself. The Vertex path (`GOOGLE_CLOUD_P

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key