# GoogleProviderOptions

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.googleprovideroptions/
> Summary: GoogleProviderOptions: Tracon's Google Gemini provider settings.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Google.dll</code></div>

Tracon's Google Gemini provider settings.

```csharp
public sealed class GoogleProviderOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.googleprovideroptions/">GoogleProviderOptions</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

This type is deliberately a `class`, not a `record`: a `record`'s
generated `ToString` would print every property, exposing the API key in a
single log line.

Validation is done by hand in [Tracon.GoogleProviderOptionsValidator](/api/tracon/);
`DataAnnotations` relies on reflection and breaks AOT compatibility.

## Constructors

### <a id="Tracon_GoogleProviderOptions__ctor"></a> GoogleProviderOptions\(\)

```csharp
public GoogleProviderOptions()
```

## Fields

### <a id="Tracon_GoogleProviderOptions_SectionName"></a> SectionName

Full path of the configuration section settings are read from.

```csharp
public const string SectionName = "Tracon:Providers:Google"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Properties

### <a id="Tracon_GoogleProviderOptions_ApiKey"></a> ApiKey

Gemini Developer API key.

```csharp
public string? ApiKey { get; set; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

#### Remarks

**This value is a secret and is not written to a file.** Use
`dotnet user-secrets`, an environment variable, or a secret manager. The
key is never written to the database, never returned by the API, and never
shown in the UI, under any condition.

### <a id="Tracon_GoogleProviderOptions_ApiVersion"></a> ApiVersion

API version to use. When [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), the SDK default applies.
Example: `v1beta`.

```csharp
public string? ApiVersion { get; set; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_GoogleProviderOptions_DefaultModel"></a> DefaultModel

Model name used when [ModelBinding.Model](/api/tracon.modelbinding/#Tracon_ModelBinding_Model) is left empty.

```csharp
public string? DefaultModel { get; set; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_GoogleProviderOptions_Endpoint"></a> Endpoint

Request address. When [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), Google's own address
(`https://generativelanguage.googleapis.com`) is used.

```csharp
public Uri? Endpoint { get; set; }
```

#### Property Value

 Uri?

### <a id="Tracon_GoogleProviderOptions_Models"></a> Models

Model catalog shown in the UI.

```csharp
public IList<ModelDescriptor> Models { get; }
```

#### Property Value

 [IList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist\-1)<[ModelDescriptor](/api/tracon.modeldescriptor/)\>

#### Remarks

Tracon carries no built-in model list; the catalog comes entirely from
here. This list *is not a validation list*: a model name absent from
it can still be used.

### <a id="Tracon_GoogleProviderOptions_Timeout"></a> Timeout

Upper time limit for a single request. When [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), the library default is used.

```csharp
public TimeSpan? Timeout { get; set; }
```

#### Property Value

 [TimeSpan](https://learn.microsoft.com/dotnet/api/system.timespan)?

#### Remarks

Must be from one millisecond to about 24.8 days ([Int32.MaxValue](https://learn.microsoft.com/dotnet/api/system.int32) milliseconds) when set; any other value fails at startup.
