Język

AgentOptimizationClient.ResolveOptionsAsync(String, CancellationToken) Method

Definition

Resolves a CandidateDeployConfig using a priority waterfall:

  1. API — calls GetCandidateConfigFlat using the client's configured endpoint and credential pipeline.
  2. Env var — reads OPTIMIZATION_CONFIG as inline JSON and deserializes it.
Returns a Response<T> wrapping the resolved config so callers can inspect HTTP status and headers. When falling back to the env var, the response from the failed API call is preserved when available. Returns null when no source matches.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AgentServer.Optimization.CandidateDeployConfig>> ResolveOptionsAsync(string candidateId, System.Threading.CancellationToken cancellationToken = default);
abstract member ResolveOptionsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.AgentServer.Optimization.CandidateDeployConfig>>
override this.ResolveOptionsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.AgentServer.Optimization.CandidateDeployConfig>>
Public Overridable Function ResolveOptionsAsync (candidateId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of CandidateDeployConfig))

Parameters

candidateId
String

The candidate identifier to resolve config for.

cancellationToken
CancellationToken

Cancellation token.

Returns

The resolved config wrapped in a Response<T>, or null when no source matched.

Applies to