Tracon.Google
1.0.0-preview.3
Prefix Reserved
dotnet add package Tracon.Google --version 1.0.0-preview.3
NuGet\Install-Package Tracon.Google -Version 1.0.0-preview.3
<PackageReference Include="Tracon.Google" Version="1.0.0-preview.3" />
<PackageVersion Include="Tracon.Google" Version="1.0.0-preview.3" />
<PackageReference Include="Tracon.Google" />
paket add Tracon.Google --version 1.0.0-preview.3
#r "nuget: Tracon.Google, 1.0.0-preview.3"
#:package Tracon.Google@1.0.0-preview.3
#addin nuget:?package=Tracon.Google&version=1.0.0-preview.3&prerelease
#tool nuget:?package=Tracon.Google&version=1.0.0-preview.3&prerelease
Tracon.Google
Google Gemini provider adapter for Tracon.
Image generation
After UseGoogle(...), call UseGoogleImages(...) to register Tracon's narrow
IImageGenerator adapter. Set an image-capable Google model explicitly.
tracon.UseGoogleImages(options =>
{
options.Enabled = true;
options.Model = "gemini-2.5-flash-image";
});
The model must generate images through generateContent. The older Imagen
predict surface is not served by the Gemini API, and a model that only
supports it fails every request.
The generator key is google. This adapter generates from a prompt only; it does not
map a WIDTHxHEIGHT request because Google's image API uses separate aspect-ratio and
size-tier settings. Count is passed as the candidate count, and an image model
commonly returns one image whatever you ask for. A requested media type is passed to
the model and the answer is checked: if the model returns another format the call
fails rather than handing back bytes that do not match the request. Configure prices
under Tracon:Pricing:Images:google when cost reporting is required.
builder.AddTracon()
.UseGoogle(apiKey, o => o.DefaultModel = "gemini-3.6-flash");
Registered provider name: google (GoogleProviderNames.Google).
Model = new ModelBinding
{
Provider = GoogleProviderNames.Google,
Model = "gemini-3.6-flash",
}
The name is google, not gemini: the same package may cover Vertex AI in the
future and should not be locked to the model family's name.
Every IChatClient produced goes through the same pipeline as Tracon.OpenAI:
UseFunctionInvocation() leaves the tool-call loop to the Microsoft Agent Framework,
UseOpenTelemetry() produces spans under the Tracon source. Circuit breaker
and content filter detection live at the ModelProviderRegistry level.
SDK used and dependency weight
The official Google.GenAI package
(owner: Google LLC, Apache-2.0). The package carries its own AsIChatClient adapter.
This package is heavier than the others. Newtonsoft.Json, System.Management,
and System.CodeDom come in transitively via Google.Apis.Auth. The weight is a
deliberate trade-off and is kept isolated inside this package: a consumer not using
Gemini pulls in none of it. Other Tracon packages are unaffected by these
dependencies.
The package is AOT-compatible (IsAotCompatible=true, zero warnings).
Provider-specific settings
Supplied per agent via the ModelBinding.ProviderSettings dictionary. A key not
in this list is not silently ignored — it produces a build error, and the message
lists the supported keys.
| Key | Type | Description |
|---|---|---|
google.safety.harassment |
string | Harassment threshold |
google.safety.hateSpeech |
string | Hate speech threshold |
google.safety.sexuallyExplicit |
string | Sexual content threshold |
google.safety.dangerousContent |
string | Dangerous content threshold |
google.safety.civicIntegrity |
string | Civic integrity threshold |
google.thinking.budgetTokens |
integer | Thinking budget, [-1, 65535] |
google.thinking.includeThoughts |
boolean | Whether a thinking summary is returned in the response |
Valid threshold values: BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE,
BLOCK_ONLY_HIGH, BLOCK_NONE, OFF. An unrecognized value produces a build error
and lists the valid values.
ProviderSettings = new Dictionary<string, JsonElement>(StringComparer.OrdinalIgnoreCase)
{
["google.safety.harassment"] = JsonSerializer.SerializeToElement("BLOCK_ONLY_HIGH"),
["google.thinking.budgetTokens"] = JsonSerializer.SerializeToElement(512),
}
Safety filter produces an empty response
When Gemini's safety filter kicks in, the response comes back empty and the
finish reason is content_filter. Tracon does not treat this as "succeeded but
empty": the run is recorded with Failed status and RunError.Type = "content_filtered". A silent empty response is the hardest kind of failure to
debug.
Detection lives in a shared decorator inside Tracon.Core; if the model produced
text before being cut off (a partial response), no error is thrown — there is a
usable answer in hand.
Known behavioral differences
- Model names go stale quickly. Measured: calling
gemini-2.5-flashreturned "This model is no longer available to new users". The catalog comes from configuration and is not a validation list. - The model list carries a resource path. The health endpoint returns
models/gemini-3.6-flashrather thangemini-3.6-flash; the prefix is stripped. - The system message is a separate field (
systemInstruction); the SDK handles the conversion. - Usage counters arrive at the end when streaming.
Health check
Hits GET {endpoint}/{apiVersion}/models, which produces no charge.
Authentication is done with the x-goog-api-key header — the key is deliberately
not put in the query string, because query strings get written in plain text to
proxy and access logs.
GET /tracon/api/models/health/google
Model catalog
{
"Tracon": {
"Providers": {
"Google": {
"ApiKey": "",
"DefaultModel": "gemini-3.6-flash",
"Models": [
{ "Name": "gemini-3.6-flash", "DisplayName": "Gemini 3.6 Flash",
"ContextWindowTokens": 1048576, "MaxOutputTokens": 65536,
"SupportsReasoning": true }
]
}
}
}
}
ApiKey is never written to this file — use dotnet user-secrets.
Links
- Guide: https://tracon.dev/guides/model-providers/
- Capability map: https://tracon.dev/capabilities/
- API reference: https://tracon.dev/api/
Licence: PolyForm Small Business 1.0.0 - free below 100 people and 1,000,000 USD (2019, inflation adjusted) revenue; a commercial licence applies above that. Terms ship in the package as LICENSE.md. Details: https://tracon.dev/reference/licensing/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Google.GenAI (>= 1.16.0)
- Tracon.Core (= 1.0.0-preview.3)
-
net8.0
- Google.GenAI (>= 1.16.0)
- Tracon.Core (= 1.0.0-preview.3)
-
net9.0
- Google.GenAI (>= 1.16.0)
- Tracon.Core (= 1.0.0-preview.3)
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 |
|---|---|---|
| 1.0.0-preview.3 | 41 | 9/24/2026 |
| 1.0.0-preview.2 | 74 | 9/20/2026 |
| 1.0.0-preview.1 | 53 | 9/20/2026 |