aip_sdk.resolve_metric_configs
aip_sdk.resolve_metric_configs(*, workspace_id: str, metric_name: str | None = None, client: APIClient | None = None) -> list[MetricConfigResolution]
Resolve what each agentic metric would use if a run were created in this workspace right now.
Only agentic metrics have a workspace-published default; a non-agentic metric is simply absent, not excluded. For each covered metric, this is the current default plus every named override available to pin instead.
Only overrides entries are valid metric_config_refs targets — default is not a
Table B row metric_config_refs can pin (see MetricConfigResolution). Omit the
metric from metric_config_refs to use the default; pin one of overrides' pairs for
anything else.
One unpaginated response per call; each override's version history is capped (see
MetricConfigResolutionOverrideGroup) and carries params + prompt slot names, not
bodies. Pass metric_name to narrow it when a workspace holds many.
Parameters
workspace_idstr: The workspace to resolve against.metric_namestr | None: Only this metric; omit to resolve every agentic metric the workspace has a default for.clientAPIClient | None: Optional pre-configured API client.
Returns
list[MetricConfigResolution]: list[MetricConfigResolution]: one entry per resolved agentic metric. Empty iflist[MetricConfigResolution]: metric_name names a metric with no workspace default — including any non-agenticlist[MetricConfigResolution]: metric, which never has one.
Raises
NotFoundError: If no workspace has this id.ForbiddenError: If the caller is not a member of this workspace.AuthError: If no credentials are configured.APIError: If the read fails, or the response is malformed.
Example:
for resolution in aip.resolve_metric_configs(workspace_id="ws-abc123"):
print(resolution.metric_name, resolution.preselected_config_version)