Table of Contents

Class GenerationConfigRoutingConfig

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API.

public record GenerationConfigRoutingConfig : IEquatable<GenerationConfigRoutingConfig>
Inheritance
GenerationConfigRoutingConfig
Implements
Inherited Members

Properties

AutoMode

In this mode, the model is selected automatically based on the content of the request.

[JsonPropertyName("autoMode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GenerationConfigRoutingConfigAutoRoutingMode? AutoMode { get; set; }

Property Value

GenerationConfigRoutingConfigAutoRoutingMode

ManualMode

In this mode, the model is specified manually.

[JsonPropertyName("manualMode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GenerationConfigRoutingConfigManualRoutingMode? ManualMode { get; set; }

Property Value

GenerationConfigRoutingConfigManualRoutingMode

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GenerationConfigRoutingConfig object.

public static GenerationConfigRoutingConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GenerationConfigRoutingConfig

The deserialized GenerationConfigRoutingConfig object, or null if deserialization fails.