aip_sdk.SutInstance
aip_sdk.SutInstance(data: dict[str, Any], client: APIClient)
A registered System Under Test.
Attributes
idstr: SUT registration IDnamestr: SUT nameversionstr: SUT version stringownerstr | None: Owner/team identifierproject_idstr | None: Associated project IDcreated_atdatetime | None: When this SUT was registeredupdated_atdatetime | None: Last update timestamp
aip_sdk.SutInstance.add_connection
aip_sdk.SutInstance.add_connection(base_url: str, label: str = 'default', auth_type: str = 'none', auth_header_name: str | None = None, auth_header_value: str | None = None, model_params: dict[str, Any] | None = None, sut_protocol: str | None = None, gdi_schema: str | None = None, task_type: str | None = None, sut_streaming: bool = False) -> Connection
Add a new connection to this SUT.
Parameters
base_urlstr: SUT endpoint URLlabelstr: Environment label (e.g., "staging", "prod"); unique among this SUT's connectionsauth_typestr: Authentication method ("none", "bearer", "api_key", "basic")auth_header_namestr | None: Header name for auth credentialsauth_header_valuestr | None: Plaintext credential (encrypted at rest by platform)model_paramsdict[str, Any] | None: Static parameters passed to the selected SUT protocolsut_protocolstr | None: Invocation protocol, e.g. "openai_chat", "huggingface_object_detection", or "rag_api"gdi_schemastr | None: Compatible dataset format (e.g. "gdi_text_v1", "gdi_image_v1")task_typestr | None: Task discriminator for task-scoped schemas, e.g. "detection" for gdi_image_v1sut_streamingbool: Stream the SUT response so evaluation records true time-to-first-byte instead of total round-trip. Recommended for long-running SUTs (video, agentic/trajectory, large RAG). Off by default.
Returns
Connection: Connection instance
Raises
DuplicateConnectionError: If this SUT already has a connection labelledlabel.NotFoundError: If the SUT no longer exists.AuthError: If credentials are missing or invalid.APIError: If the platform otherwise rejects the connection.
Examples
>>> sut = aip.Sut.register("my-llm")
>>> conn = sut.add_connection(
... base_url="https://api.openai.com/v1/chat/completions",
... label="prod",
... auth_type="bearer",
... auth_header_name="Authorization",
... auth_header_value="sk-...",
... model_params={"model": "gpt-4o"},
... sut_protocol="openai_chat",
... gdi_schema="gdi_text_v1",
... sut_streaming=True,
... )
aip_sdk.SutInstance.connection_count
aip_sdk.SutInstance.connection_count: int = data.get('connection_count', 0)
No docstring is defined in the source.
aip_sdk.SutInstance.connections
aip_sdk.SutInstance.connections() -> list[Connection]
List all connections for this SUT.
Returns
list[Connection]: List of Connection instances
aip_sdk.SutInstance.created_at
aip_sdk.SutInstance.created_at: datetime | None = parse_dt(data['created_at'])
No docstring is defined in the source.
aip_sdk.SutInstance.delete
aip_sdk.SutInstance.delete() -> None
Delete this SUT registration.
Cascades to all connections and their adapters.
Raises
NotFoundError: If the SUT no longer exists, or belongs to a workspace the caller is not a member of.ForbiddenError: If the caller is not an editor or admin of the SUT's workspace. A platform admin must be a member of that workspace too.
aip_sdk.SutInstance.id
aip_sdk.SutInstance.id: str = data['id']
No docstring is defined in the source.
aip_sdk.SutInstance.name
aip_sdk.SutInstance.name: str = data['name']
No docstring is defined in the source.
aip_sdk.SutInstance.owner
aip_sdk.SutInstance.owner: str | None = data.get('owner')
No docstring is defined in the source.
aip_sdk.SutInstance.project_id
aip_sdk.SutInstance.project_id: str | None = data.get('project_id')
No docstring is defined in the source.
aip_sdk.SutInstance.runs
aip_sdk.SutInstance.runs(page: int = 1, per_page: int = 20) -> dict[str, Any]
List evaluation runs that used this SUT.
Parameters
pageint: Page number (1-indexed)per_pageint: Results per page
Returns
dict[str, Any]: Paginated response with run records
aip_sdk.SutInstance.update
aip_sdk.SutInstance.update(name: str | None = None, version: str | None = None, owner: str | None = None) -> SutInstance
Update this SUT's metadata.
Parameters
namestr | None: New SUT nameversionstr | None: New version stringownerstr | None: New owner identifier
Returns
SutInstance: Updated SutInstance
Raises
NotFoundError: If the SUT no longer exists, or belongs to a workspace the caller is not a member of.ForbiddenError: If the caller is not an editor or admin of the SUT's workspace. A platform admin must be a member of that workspace too.
aip_sdk.SutInstance.updated_at
aip_sdk.SutInstance.updated_at: datetime | None = parse_dt(data['updated_at'])
No docstring is defined in the source.
aip_sdk.SutInstance.version
aip_sdk.SutInstance.version: str = data['version']
No docstring is defined in the source.