aip_sdk.list_metric_configs
aip_sdk.list_metric_configs(*, workspace_id: str | None = None, config_name: str | None = None, metric_name: str | None = None, page: int = 1, per_page: int = 20, client: APIClient | None = None, include_global: bool | None = None, all_workspaces: bool = False) -> list[MetricConfigSummary]
List metric configs visible to the caller, newest first.
Reads your session's workspace unless you name one, and raises if none is set.
Pass all_workspaces=True to read across every workspace you can access.
Parameters
workspace_idstr | None: Only configs owned by this workspace. Omitting it lists your session's workspace, and raises if none is set.all_workspacesbool: Read across every workspace you can access.config_namestr | None: Filter by configuration name.metric_namestr | None: Filter by the metric implementation configured — not the config's own name.pageint: 1-based page number.per_pageint: Page size (1-100).clientAPIClient | None: Optional pre-configured API client.include_globalbool | None: Deprecated and ignored — there is no more platform-wide scope to include, every config is workspace-owned. Passing any value (includingFalse) emits aDeprecationWarning. Will be removed in a future release.
Returns
list[MetricConfigSummary]: list[MetricConfigSummary]: the configs on this page only — up toper_pagelist[MetricConfigSummary]: rows, not every match. Full prompt templates are not included — calllist[MetricConfigSummary]: func:get_metric_configorMetricConfigSummary.load()for the detaillist[MetricConfigSummary]: object. Useiter_metric_configs()instead to walk every matching configlist[MetricConfigSummary]: regardless of how many pages that takes.
Raises
InvalidArgumentError: Ifpageorper_pageis out of range.AuthError: If credentials are missing or invalid.ForbiddenError: Ifworkspace_idnames a workspace the caller cannot access.APIError: If the listing request returns a malformed response.NoWorkspaceSelectedError: No workspace was passed, none is configured for the session, andall_workspaceswas not set.
Example:
page_1 = aip.list_metric_configs(metric_name="agent.custom_judge_rubric")
for config in page_1:
print(config.config_name, config.config_version)