Soenneker.SemanticKernel.Pool.Gemini
4.0.534
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.SemanticKernel.Pool.Gemini --version 4.0.534
NuGet\Install-Package Soenneker.SemanticKernel.Pool.Gemini -Version 4.0.534
<PackageReference Include="Soenneker.SemanticKernel.Pool.Gemini" Version="4.0.534" />
<PackageVersion Include="Soenneker.SemanticKernel.Pool.Gemini" Version="4.0.534" />
<PackageReference Include="Soenneker.SemanticKernel.Pool.Gemini" />
paket add Soenneker.SemanticKernel.Pool.Gemini --version 4.0.534
#r "nuget: Soenneker.SemanticKernel.Pool.Gemini, 4.0.534"
#:package Soenneker.SemanticKernel.Pool.Gemini@4.0.534
#addin nuget:?package=Soenneker.SemanticKernel.Pool.Gemini&version=4.0.534
#tool nuget:?package=Soenneker.SemanticKernel.Pool.Gemini&version=4.0.534
Soenneker.SemanticKernel.Pool.Gemini
Gemini connector registration helpers for Soenneker.SemanticKernel.Pool.
Installation
dotnet add package Soenneker.SemanticKernel.Pool.Gemini
Add a Gemini entry
Resolve the pool and HTTP client cache from dependency injection, then register a chat or embedding entry:
using Soenneker.SemanticKernel.Enums.KernelType;
using Soenneker.SemanticKernel.Pool.Abstract;
using Soenneker.SemanticKernel.Pool.Gemini;
using Soenneker.Utils.HttpClientCache.Abstract;
await pool.AddGemini(
poolId: "chat",
key: "gemini-primary",
type: KernelType.Chat,
modelId: "gemini-model-id",
apiKey: configuration["Gemini:ApiKey"]!,
endpoint: "https://generativelanguage.googleapis.com",
httpClientCache: httpClientCache,
rps: 2,
rpm: 60,
rpd: 1_000,
tokensPerDay: null,
cancellationToken);
Use KernelType.Chat for Google AI chat completion or KernelType.Embedding for the Google AI embedding generator. Other kernel types throw NotSupportedException when the pool first constructs the kernel.
The adapter caches chat HTTP clients under gemini:{poolId}:{key} with a five-minute timeout. The endpoint argument is retained in the entry's SemanticKernelOptions, but this adapter does not pass it to the Google connector; connector endpoint behavior therefore comes from the Google Semantic Kernel package.
Pool quota values are reservations made when GetAvailable selects the entry. tokensPerDay counts one unit per acquisition; it is not populated from provider token usage.
Remove the entry
Use the matching helper so both the pool entry and its cached HTTP client are removed:
await pool.RemoveGemini(
"chat",
"gemini-primary",
httpClientCache,
cancellationToken);
Keep the API key in a protected configuration provider and avoid logging or serializing the generated SemanticKernelOptions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.SemanticKernel.Connectors.Google (>= 1.80.0-alpha)
- Soenneker.SemanticKernel.Pool (>= 4.0.392)
- Soenneker.Utils.HttpClientCache (>= 4.0.2049)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.544 | 0 | 9/4/2026 |
| 4.0.543 | 0 | 9/4/2026 |
| 4.0.540 | 0 | 9/4/2026 |
| 4.0.539 | 0 | 9/3/2026 |
| 4.0.537 | 42 | 9/1/2026 |
| 4.0.536 | 37 | 9/1/2026 |
| 4.0.535 | 46 | 8/31/2026 |
| 4.0.534 | 49 | 8/31/2026 |
| 4.0.533 | 74 | 8/31/2026 |
| 4.0.532 | 93 | 8/31/2026 |
| 4.0.531 | 79 | 8/30/2026 |
| 4.0.530 | 83 | 8/30/2026 |
| 4.0.529 | 83 | 8/30/2026 |
| 4.0.528 | 78 | 8/30/2026 |
| 4.0.527 | 79 | 8/30/2026 |
| 4.0.526 | 81 | 8/30/2026 |
| 4.0.525 | 85 | 8/30/2026 |
| 4.0.524 | 79 | 8/29/2026 |
| 4.0.523 | 81 | 8/29/2026 |
| 4.0.522 | 90 | 8/26/2026 |
Updated NuGet packages