Gemini Provider
Google Gemini AI models integration addon for AI Core.
Features
- Google Gemini Integration - Full integration with Google's Gemini AI models
- Model Selection - Choose from available Gemini models (Pro, Ultra, etc.)
- API Configuration - Easy setup with Google Cloud credentials
- Multi-Modal Support - Support for text, image, and document inputs
- Streaming Responses - Real-time streaming for long-form content
Requirements
| Requirement | Details |
|---|---|
| Dependencies | AICore |
| PHP Version | 8.2+ |
| Google Cloud | Valid Google Cloud account with Gemini API access |
Installation
- Ensure AI Core module is installed and enabled
- Enable the Gemini Provider module in Settings > Modules
- Configure your Google Cloud API credentials
Configuration
Navigate to Settings > AI Core > Providers > Gemini to configure:
- API Key - Your Google Cloud API key with Gemini access
- Default Model - Select default Gemini model
- Safety Settings - Configure content safety thresholds
- Region - Select preferred Google Cloud region
Usage
Using Gemini as Provider
use Modules\AICore\Services\AIService;
$aiService = app(AIService::class);
$response = $aiService->complete([
'provider' => 'gemini',
'model' => 'gemini-3-flash',
'prompt' => 'Analyze this business report...',
]);
Multi-Modal Request
$response = $aiService->complete([
'provider' => 'gemini',
'model' => 'gemini-3-pro',
'prompt' => 'Describe this image',
'images' => [$imageBase64],
]);
Supported Models
Gemini 3 Series (Latest)
| Model | Context | Description |
|---|---|---|
gemini-3-pro | 1M tokens | Most intelligent model with frontier intelligence |
gemini-3-flash | 1M tokens | Default model with fast performance and thinking |
gemini-3-deep-think | 1M tokens | Advanced reasoning for complex problems |
Gemini 2.5 Series (Stable)
| Model | Context | Description |
|---|---|---|
gemini-2.5-pro | 1M tokens | Superior reasoning with thinking mode |
gemini-2.5-flash | 1M tokens | Price-performance optimized |
gemini-2.5-flash-lite | 1M tokens | Most cost-efficient option |
Gemini 2.0 Series
| Model | Context | Description |
|---|---|---|
gemini-2.0-flash | 1M tokens | Fast multimodal model |
Notes
- Requires valid Google Cloud billing account
- Usage is tracked through AI Core's usage monitoring
- Supports all Gemini API features including function calling
- Automatic retry with exponential backoff on rate limits