Soenneker.Maf.Pool.Gemini 11.0.204

Prefix Reserved
dotnet add package Soenneker.Maf.Pool.Gemini --version 11.0.204
                    
NuGet\Install-Package Soenneker.Maf.Pool.Gemini -Version 11.0.204
                    
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.204" />
                    
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.204" />
                    
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.204
                    
#r "nuget: Soenneker.Maf.Pool.Gemini, 11.0.204"
                    
#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.204
                    
#: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.204
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Maf.Pool.Gemini&version=11.0.204
                    
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.204 42 11/15/2026
11.0.202 613 11/11/2026
11.0.201 61 11/11/2026
11.0.200 113 11/11/2026
11.0.199 3,948 11/7/2026
11.0.198 6,220 11/6/2026
11.0.197 6,248 11/3/2026
11.0.196 634 11/3/2026
11.0.195 6,923 10/31/2026
11.0.194 217 10/27/2026
11.0.193 112 10/27/2026
11.0.192 111 10/27/2026
11.0.191 110 10/27/2026
11.0.190 131 10/27/2026
11.0.189 106 10/26/2026
11.0.188 103 10/26/2026
11.0.187 98 10/26/2026
11.0.186 108 10/26/2026
11.0.185 113 10/26/2026
11.0.184 121 10/26/2026
Loading failed

Updated Soenneker.Maf.Pool to 11.0.203