ModelRouterDetails Class

  • java.lang.Object
    • com.azure.ai.agents.models.ModelRouterDetails

Implements

public final class ModelRouterDetails
implements JsonSerializable<ModelRouterDetails>

Routing decision metadata from Model Router.

Method Summary

Modifier and Type Method and Description
static ModelRouterDetails fromJson(JsonReader jsonReader)

Reads an instance of ModelRouterDetails from the JsonReader.

ModelRouterMode getMode()

Get the mode property: The routing mode for the request.

List<RoutingTraceEntry> getRoutingTrace()

Get the routingTrace property: Ordered trace of routing decisions.

SessionAffinityDetails getSessionAffinity()

Get the sessionAffinity property: Session affinity metadata for the routing decision.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ModelRouterDetails fromJson(JsonReader jsonReader)

Reads an instance of ModelRouterDetails from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ModelRouterDetails if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getMode

public ModelRouterMode getMode()

Get the mode property: The routing mode for the request.

Returns:

the mode value.

getRoutingTrace

public List<RoutingTraceEntry> getRoutingTrace()

Get the routingTrace property: Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

Returns:

the routingTrace value.

getSessionAffinity

public SessionAffinityDetails getSessionAffinity()

Get the sessionAffinity property: Session affinity metadata for the routing decision. Omitted when affinity metadata is unavailable or the preview feature is not enabled.

Returns:

the sessionAffinity value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to