Soenneker.Maf.Pool.Gemini 11.0.209

Prefix Reserved
dotnet add package Soenneker.Maf.Pool.Gemini --version 11.0.209
                    
NuGet\Install-Package Soenneker.Maf.Pool.Gemini -Version 11.0.209
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Maf.Pool.Gemini" Version="11.0.209" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Maf.Pool.Gemini" Version="11.0.209" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Maf.Pool.Gemini" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Maf.Pool.Gemini --version 11.0.209
                    
#r "nuget: Soenneker.Maf.Pool.Gemini, 11.0.209"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Maf.Pool.Gemini@11.0.209
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Maf.Pool.Gemini&version=11.0.209
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Maf.Pool.Gemini&version=11.0.209
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Maf.Pool.Gemini

Provides Gemini-specific registration extensions for IMafPool, enabling integration with Google Gemini via Microsoft Agent Framework.

Install

dotnet add package Soenneker.Maf.Pool.Gemini

Usage

using Soenneker.Maf.Pool.Gemini;
using Soenneker.Maf.Pool.Abstract;

await pool.AddGemini(
    poolId: "chat",
    key: "gemini-primary",
    modelId: "gemini-2.5-flash",
    apiKey: configuration["GEMINI_API_KEY"]!,
    rpm: 60,
    instructions: "Answer concisely.",
    cancellationToken: cancellationToken);

(AIAgent? agent, IMafPoolEntry? entry) =
    await pool.GetAvailable("chat", cancellationToken);

pool is an IMafPool registered by Soenneker.Maf.Pool. Pass endpoint only when targeting a compatible non-default Gemini endpoint.

What you get

  • MafPoolGeminiExtension — Provides Gemini-specific registration extensions for IMafPool, enabling integration with Google Gemini via Microsoft Agent Framework.

API at a glance

API What it does Result / important behavior
MafPoolGeminiExtension.AddGemini(pool, poolId, key, modelId, apiKey, endpoint, rps, rpm, rpd, tokensPerDay, instructions, cancellationToken) Registers a Gemini model in the agent pool with optional rate/token limits. A task that completes when the gemini addition is complete.
MafPoolGeminiExtension.RemoveGemini(pool, poolId, key, cancellationToken) Unregisters a Gemini model from the agent pool and removes the associated cache entry. True if the entry existed and was removed; false if it was not present.

Practical notes

  • The agent is created lazily and reused until its entry is removed.
  • Store the API key in a secret provider; the pool retains it in the entry options while the entry is registered.
  • Omitted instructions default to You are a helpful assistant.
  • Checkout consumes one request from the configured quota. tokensPerDay is not reconciled against actual provider token usage.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
11.0.209 94 11/25/2026
11.0.208 194 11/19/2026
11.0.207 93 11/18/2026
11.0.206 94 11/18/2026
11.0.205 100 11/18/2026
11.0.204 174 11/15/2026
11.0.202 662 11/11/2026
11.0.201 108 11/11/2026
11.0.200 159 11/11/2026
11.0.199 3,959 11/7/2026
11.0.198 6,229 11/6/2026
11.0.197 6,258 11/3/2026
11.0.196 638 11/3/2026
11.0.195 6,934 10/31/2026
11.0.194 222 10/27/2026
11.0.193 116 10/27/2026
11.0.192 116 10/27/2026
11.0.191 114 10/27/2026
11.0.190 138 10/27/2026
11.0.189 110 10/26/2026
Loading failed

Update dependency GeminiDotnet.Extensions.AI to 0.30.0 (#192)