Skip to main content

aip_sdk.sut

SUT (System Under Test) Registry SDK.

aip_sdk.sut.Adapter​

aip_sdk.sut.Adapter(data: dict[str, Any], sut_id: str, client: APIClient)

JSONPath-based adapter for mapping raw SUT response to GDI schema.

Attributes

  • id str: Adapter ID
  • connection_id str: Parent connection ID
  • template_name str | None: Name of built-in template (if used)
  • mapping_config dict[str, Any]: JSONPath mappings dict
  • created_at datetime | None: When this adapter was created

aip_sdk.sut.Adapter.connection_id​

aip_sdk.sut.Adapter.connection_id: str = data['connection_id']

No docstring is defined in the source.

aip_sdk.sut.Adapter.created_at​

aip_sdk.sut.Adapter.created_at: datetime | None = parse_dt(data['created_at'])

No docstring is defined in the source.

aip_sdk.sut.Adapter.id​

aip_sdk.sut.Adapter.id: str = data['id']

No docstring is defined in the source.

aip_sdk.sut.Adapter.mapping_config​

aip_sdk.sut.Adapter.mapping_config: dict[str, Any] = data.get('mapping_config', {})

No docstring is defined in the source.

aip_sdk.sut.Adapter.template_name​

aip_sdk.sut.Adapter.template_name: str | None = data.get('template_name')

No docstring is defined in the source.

aip_sdk.sut.Adapter.validate​

aip_sdk.sut.Adapter.validate(sample_payload: list[Any] | dict[str, Any]) -> AdapterValidateResult

Validate the adapter's JSONPath mappings against a sample SUT response.

Parameters

  • sample_payload list[Any] | dict[str, Any]: A raw SUT response to test mappings against, exactly as the endpoint returns it — including the top-level array a CV endpoint returns, which needs no wrapping

Returns

Examples

>>> adapter = conn.get_adapter()
>>> sample = {"choices": [{"message": {"content": "Hello"}}]}
>>> result = adapter.validate(sample)
>>> if result.valid:
... print(f"Mapped output: {result.mapped}")
... else:
... print(f"Errors: {result.errors}")

A classification SUT returns its scores as a bare array:

>>> result = adapter.validate([{"label": "cat", "score": 0.9}, {"label": "dog", "score": 0.1}])
>>> print(result.mapped["predictions"])

aip_sdk.sut.AdapterValidateResult​

aip_sdk.sut.AdapterValidateResult(valid: bool, mapped: dict[str, Any], errors: list[str])

Result from validating an adapter's JSONPath mappings.

Attributes

  • valid bool: Whether all mappings resolved successfully
  • mapped dict[str, Any]: The mapped output dictionary
  • errors list[str]: List of validation error messages

aip_sdk.sut.AdapterValidateResult.errors​

aip_sdk.sut.AdapterValidateResult.errors: list[str]

No docstring is defined in the source.

aip_sdk.sut.AdapterValidateResult.mapped​

aip_sdk.sut.AdapterValidateResult.mapped: dict[str, Any]

No docstring is defined in the source.

aip_sdk.sut.AdapterValidateResult.valid​

aip_sdk.sut.AdapterValidateResult.valid: bool

No docstring is defined in the source.

aip_sdk.sut.Connection​

aip_sdk.sut.Connection(data: dict[str, Any], client: APIClient)

A connection to a SUT (specific environment).

Attributes

  • id str: Connection ID
  • sut_id str: Parent SUT ID
  • label str: Environment label (e.g., "staging", "prod")
  • base_url str: SUT endpoint base URL
  • auth_type str: Authentication method ("none", "bearer", "api_key", "basic")
  • auth_header_name str | None: Header name for auth (e.g., "Authorization")
  • model_params dict[str, Any]: Static parameters passed to the selected SUT protocol
  • sut_protocol str | None: Invocation protocol, e.g. "openai_chat", "huggingface_object_detection", or "rag_api"
  • gdi_schema str | None: GDI dataset schema this connection produces (e.g. "gdi_text_v1")
  • task_type str | None: Task discriminator for task-scoped schemas, e.g. "detection" for gdi_image_v1
  • sut_streaming bool: When True, responses are streamed so evaluation captures true time-to-first-byte rather than total round-trip. Recommended for long-running SUTs (video, agentic/trajectory, large RAG); off by default.
  • created_at datetime | None: When this connection was created

aip_sdk.sut.Connection.auth_header_name​

aip_sdk.sut.Connection.auth_header_name: str | None = data.get('auth_header_name')

No docstring is defined in the source.

aip_sdk.sut.Connection.auth_type​

aip_sdk.sut.Connection.auth_type: str = data['auth_type']

No docstring is defined in the source.

aip_sdk.sut.Connection.base_url​

aip_sdk.sut.Connection.base_url: str = data['base_url']

No docstring is defined in the source.

aip_sdk.sut.Connection.created_at​

aip_sdk.sut.Connection.created_at: datetime | None = parse_dt(data['created_at'])

No docstring is defined in the source.

aip_sdk.sut.Connection.delete​

aip_sdk.sut.Connection.delete() -> None

Remove this connection from the SUT.

Raises

  • NotFoundError: If the connection no longer exists, or the SUT 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.sut.Connection.gdi_schema​

aip_sdk.sut.Connection.gdi_schema: str | None = data.get('gdi_schema')

No docstring is defined in the source.

aip_sdk.sut.Connection.get_adapter​

aip_sdk.sut.Connection.get_adapter() -> Adapter

Get the current response parser adapter for this connection.

Returns

Raises

aip_sdk.sut.Connection.id​

aip_sdk.sut.Connection.id: str = data['id']

No docstring is defined in the source.

aip_sdk.sut.Connection.label​

aip_sdk.sut.Connection.label: str = data['label']

No docstring is defined in the source.

aip_sdk.sut.Connection.model_params​

aip_sdk.sut.Connection.model_params: dict[str, Any] = data.get('model_params') or {}

No docstring is defined in the source.

aip_sdk.sut.Connection.set_adapter​

aip_sdk.sut.Connection.set_adapter(mapping_config: dict[str, str], template_name: str | None = None) -> Adapter

Set or replace the response parser adapter for this connection.

Parameters

  • mapping_config dict[str, str]: JSONPath mappings from SUT response to GDI schema Example: {"sut_response": "$.choices[0].message.content"}
  • template_name str | None: Optional built-in template to use as base ("openai_chat", "cv_detection", "cv_classification", "rag_api")

Returns

Raises

  • NotFoundError: If the connection no longer exists, or the SUT 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.

Examples

>>> conn = sut.add_connection(...)
>>> adapter = conn.set_adapter(
... template_name="openai_chat",
... mapping_config={
... "sut_response": "$.choices[0].message.content",
... "usage_prompt_tokens": "$.usage.prompt_tokens",
... },
... )

aip_sdk.sut.Connection.sut_id​

aip_sdk.sut.Connection.sut_id: str = data['sut_id']

No docstring is defined in the source.

aip_sdk.sut.Connection.sut_protocol​

aip_sdk.sut.Connection.sut_protocol: str | None = data.get('sut_protocol')

No docstring is defined in the source.

aip_sdk.sut.Connection.sut_streaming​

aip_sdk.sut.Connection.sut_streaming: bool = data.get('sut_streaming', False)

No docstring is defined in the source.

aip_sdk.sut.Connection.task_type​

aip_sdk.sut.Connection.task_type: str | None = data.get('task_type')

No docstring is defined in the source.

aip_sdk.sut.Connection.test​

aip_sdk.sut.Connection.test() -> ConnectionTestResult

Test this connection by firing a request using the project's golden dataset.

Returns

Examples

>>> conn = sut.add_connection(...)
>>> result = conn.test()
>>> if result.success:
... print(f"SUT responded in {result.duration_ms}ms")
... print(f"Raw response: {result.raw_response}")

aip_sdk.sut.Connection.update​

aip_sdk.sut.Connection.update(label: str | None = None, base_url: str | None = None, auth_type: str | None = 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 | None = None) -> Connection

Update this connection's configuration.

Parameters

  • label str | None: New environment label; unique among this SUT's connections
  • base_url str | None: New endpoint URL
  • auth_type str | None: New auth method
  • auth_header_name str | None: New auth header name
  • auth_header_value str | None: New credential (plaintext, encrypted at rest)
  • model_params dict[str, Any] | None: New static protocol parameters
  • sut_protocol str | None: New invocation protocol
  • gdi_schema str | None: New compatible dataset format (e.g. "gdi_text_v1")
  • task_type str | None: New task discriminator for task-scoped schemas
  • sut_streaming bool | None: Toggle response streaming for true time-to-first-byte capture. None leaves the current setting unchanged.

Returns

Raises

  • DuplicateConnectionError: If another connection on this SUT is already labelled label.
  • NotFoundError: If the connection no longer exists, or the SUT 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.
  • AuthError: If credentials are missing or invalid.
  • APIError: If the update otherwise fails.

aip_sdk.sut.ConnectionTestResult​

aip_sdk.sut.ConnectionTestResult(success: bool, status_code: int | None, raw_response: Any | None, error: str | None, duration_ms: float | None, reachability: str | None = None, reason: str | None = None)

Result from testing a SUT connection.

Attributes

  • success bool: Whether the test request succeeded
  • status_code int | None: HTTP status code from the SUT response
  • reachability str | None: Outcome classification (e.g. "ok", "auth_failed", "endpoint_misconfigured", "payload_rejected", "unreachable")
  • reason str | None: Human-readable explanation of the outcome
  • raw_response Any | None: The raw SUT response body
  • error str | None: Error message if test failed
  • duration_ms float | None: Request duration in milliseconds

aip_sdk.sut.ConnectionTestResult.duration_ms​

aip_sdk.sut.ConnectionTestResult.duration_ms: float | None

No docstring is defined in the source.

aip_sdk.sut.ConnectionTestResult.error​

aip_sdk.sut.ConnectionTestResult.error: str | None

No docstring is defined in the source.

aip_sdk.sut.ConnectionTestResult.raw_response​

aip_sdk.sut.ConnectionTestResult.raw_response: Any | None

No docstring is defined in the source.

aip_sdk.sut.ConnectionTestResult.reachability​

aip_sdk.sut.ConnectionTestResult.reachability: str | None = None

No docstring is defined in the source.

aip_sdk.sut.ConnectionTestResult.reason​

aip_sdk.sut.ConnectionTestResult.reason: str | None = None

No docstring is defined in the source.

aip_sdk.sut.ConnectionTestResult.status_code​

aip_sdk.sut.ConnectionTestResult.status_code: int | None

No docstring is defined in the source.

aip_sdk.sut.ConnectionTestResult.success​

aip_sdk.sut.ConnectionTestResult.success: bool

No docstring is defined in the source.

aip_sdk.sut.Sut​

aip_sdk.sut.Sut

SUT Registry top-level access.

Examples

>>> import aip_sdk as aip
>>> aip.init(base_url, api_key=api_key)
>>> sut = aip.Sut.register(name="my-gpt4", version="2024-01", project_id=project.id)
>>> conn = sut.add_connection(
... base_url="https://api.openai.com/v1/chat/completions",
... auth_type="bearer",
... auth_header_name="Authorization",
... auth_header_value="sk-...",
... gdi_schema="gdi_text_v1",
... )
>>> result = conn.test()
>>> print(f"Success: {result.success}, Duration: {result.duration_ms}ms")
>>> adapter = conn.set_adapter(
... template_name="openai_chat", mapping_config={"sut_response": "$.choices[0].message.content"}
... )
>>> sample = {"choices": [{"message": {"content": "Hello"}}]}
>>> validation = adapter.validate(sample)
>>> print(validation.mapped) # {"sut_response": "Hello"}

aip_sdk.sut.Sut.aget​

async aip_sdk.sut.Sut.aget(sut_id: str, client: AsyncAPIClient | None = None) -> SutInstance

Async variant of get().

Parameters

  • sut_id str: SUT registration ID
  • client AsyncAPIClient | None: Optional async API client

Returns

Raises

aip_sdk.sut.Sut.aget_or_register​

async aip_sdk.sut.Sut.aget_or_register(name: str, version: str = '1.0', owner: str | None = None, project_id: str | None = None, workspace_id: str | None = None, client: AsyncAPIClient | None = None) -> tuple[SutInstance, bool]

Async variant of get_or_register().

Parameters

  • name str: SUT name to look up or register.
  • version str: Version string (used only when registering).
  • owner str | None: Owner identifier (used only when registering).
  • project_id str | None: Scope the registration to this project. The lookup widens to this project's workspace when it has one, else stays project-scoped — matching the API's own uniqueness rule.
  • workspace_id str | None: Scope the lookup and registration to this workspace when no project_id is given. Falls back to the client config's workspace_id. Scoping the lookup matters because the backend allows duplicate SUT names across workspaces — without it a same-named SUT in another workspace could be returned, or a DuplicateSutError raised for one that already exists here.
  • client AsyncAPIClient | None: Optional async API client.

Returns

  • SutInstance: (sut, created) — the SutInstance and True when freshly
  • bool: registered, False when an existing SUT was found.

Raises

aip_sdk.sut.Sut.alist​

async aip_sdk.sut.Sut.alist(project_id: str | None = None, workspace_id: str | None = None, page: int = 1, per_page: int = 100, client: AsyncAPIClient | None = None, *, all_workspaces: bool = False) -> list[SutInstance]

Async variant of list().

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

  • project_id str | None: Scope the listing to this project, which determines its workspace. Not combinable with workspace_id.
  • workspace_id str | None: Filter by workspace (matches SUTs scoped to the workspace directly or via a project in it)
  • page int: Page number (1-indexed)
  • per_page int: Results per page
  • client AsyncAPIClient | None: Optional async API client
  • all_workspaces bool: Read across every workspace you can access.

Returns

  • list[SutInstance]: List of SutInstance objects

Raises

  • ForbiddenError: If workspace_id names a workspace the caller cannot access.
  • InvalidArgumentError: If workspace_id is combined with all_workspaces, or with project_id — a project already determines its workspace.
  • NoWorkspaceSelectedError: No workspace was passed, none is configured for the session, and all_workspaces was not set.

aip_sdk.sut.Sut.aregister​

async aip_sdk.sut.Sut.aregister(name: str, version: str = '1.0', owner: str | None = None, project_id: str | None = None, workspace_id: str | None = None, client: AsyncAPIClient | None = None) -> SutInstance

Async variant of register().

Parameters

  • name str: SUT name
  • version str: Version identifier
  • owner str | None: Owner/team identifier
  • project_id str | None: Associated project ID
  • workspace_id str | None: Workspace to scope the SUT to. Pass this or project_id, not both — a project-scoped SUT inherits its workspace from the project. Falls back to the client config's workspace_id; with neither, the registration is refused rather than creating a SUT no non-admin caller can see.
  • client AsyncAPIClient | None: Optional async API client

Returns

  • SutInstance: SutInstance (with a sync client for subsequent instance method calls)

Raises

aip_sdk.sut.Sut.get​

aip_sdk.sut.Sut.get(sut_id: str, client: APIClient | None = None) -> SutInstance

Fetch a registered SUT by ID.

Parameters

  • sut_id str: SUT registration ID
  • client APIClient | None: Optional API client

Returns

Raises

aip_sdk.sut.Sut.get_or_register​

aip_sdk.sut.Sut.get_or_register(name: str, version: str = '1.0', owner: str | None = None, project_id: str | None = None, workspace_id: str | None = None, client: APIClient | None = None) -> tuple[SutInstance, bool]

Get an existing SUT by name or register it.

Parameters

  • name str: SUT name to look up or register.
  • version str: Version string (used only when registering).
  • owner str | None: Owner identifier (used only when registering).
  • project_id str | None: Scope the registration to this project. The lookup widens to this project's workspace when it has one, else stays project-scoped — matching the API's own uniqueness rule.
  • workspace_id str | None: Scope the lookup and registration to this workspace when no project_id is given. Falls back to the client config's workspace_id. Scoping the lookup matters because the backend allows duplicate SUT names across workspaces — without it a same-named SUT in another workspace could be returned, or a DuplicateSutError raised for one that already exists here.
  • client APIClient | None: Optional API client.

Returns

  • SutInstance: (sut, created) — the SutInstance and True when freshly
  • bool: registered, False when an existing SUT was found.

Raises

Example:

sut, created = aip.Sut.get_or_register(
name="my-detector-v1",
version="1.0",
project_id=project.id,
)
print("Registered" if created else "Reusing", sut.id)

aip_sdk.sut.Sut.list​

aip_sdk.sut.Sut.list(project_id: str | None = None, workspace_id: str | None = None, page: int = 1, per_page: int = 100, client: APIClient | None = None, *, all_workspaces: bool = False) -> list[SutInstance]

List registered SUTs.

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

  • project_id str | None: Scope the listing to this project, which determines its workspace. Not combinable with workspace_id.
  • workspace_id str | None: Filter by workspace (matches SUTs scoped to the workspace directly or via a project in it)
  • page int: Page number (1-indexed)
  • per_page int: Results per page
  • client APIClient | None: Optional API client
  • all_workspaces bool: Read across every workspace you can access.

Returns

  • list[SutInstance]: List of SutInstance objects

Raises

  • ForbiddenError: If workspace_id names a workspace the caller cannot access.
  • InvalidArgumentError: If workspace_id is combined with all_workspaces, or with project_id — a project already determines its workspace.
  • NoWorkspaceSelectedError: No workspace was passed, none is configured for the session, and all_workspaces was not set.

aip_sdk.sut.Sut.register​

aip_sdk.sut.Sut.register(name: str, version: str = '1.0', owner: str | None = None, project_id: str | None = None, workspace_id: str | None = None, client: APIClient | None = None) -> SutInstance

Register a new System Under Test.

Parameters

  • name str: SUT name
  • version str: Version identifier
  • owner str | None: Owner/team identifier
  • project_id str | None: Associated project ID
  • workspace_id str | None: Workspace to scope the SUT to. Pass this or project_id, not both — a project-scoped SUT inherits its workspace from the project. Falls back to the client config's workspace_id; with neither, the registration is refused rather than creating a SUT no non-admin caller can see.
  • client APIClient | None: Optional API client

Returns

Raises

Examples

>>> sut = aip.Sut.register(name="production-gpt4", version="2024-01-15", project_id=project.id)

aip_sdk.sut.Sut.templates​

aip_sdk.sut.Sut.templates(client: APIClient | None = None) -> dict[str, Any]

List all built-in adapter templates.

Returns

  • dict[str, Any]: Dict of template name → template config. Each entry includes:
  • dict[str, Any]: - description: human-readable description
  • dict[str, Any]: - sut_protocol: invocation protocol identifier
  • dict[str, Any]: - gdi_schema: expected GDI dataset schema
  • dict[str, Any]: - model_params: default model params for this template
  • dict[str, Any]: - params_schema: JSON Schema dict for valid model_params (if the builder declares one), suitable for validation or UI rendering
  • dict[str, Any]: - mapping_config: default JSONPath response mappings

Examples

>>> templates = aip.Sut.templates()
>>> print(templates["openai_chat"]["mapping_config"])
>>> print(templates["openai_chat"]["params_schema"])

aip_sdk.sut.SutInstance​

aip_sdk.sut.SutInstance(data: dict[str, Any], client: APIClient)

A registered System Under Test.

Attributes

  • id str: SUT registration ID
  • name str: SUT name
  • version str: SUT version string
  • owner str | None: Owner/team identifier
  • project_id str | None: Associated project ID
  • created_at datetime | None: When this SUT was registered
  • updated_at datetime | None: Last update timestamp

aip_sdk.sut.SutInstance.add_connection​

aip_sdk.sut.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_url str: SUT endpoint URL
  • label str: Environment label (e.g., "staging", "prod"); unique among this SUT's connections
  • auth_type str: Authentication method ("none", "bearer", "api_key", "basic")
  • auth_header_name str | None: Header name for auth credentials
  • auth_header_value str | None: Plaintext credential (encrypted at rest by platform)
  • model_params dict[str, Any] | None: Static parameters passed to the selected SUT protocol
  • sut_protocol str | None: Invocation protocol, e.g. "openai_chat", "huggingface_object_detection", or "rag_api"
  • gdi_schema str | None: Compatible dataset format (e.g. "gdi_text_v1", "gdi_image_v1")
  • task_type str | None: Task discriminator for task-scoped schemas, e.g. "detection" for gdi_image_v1
  • sut_streaming bool: 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

Raises

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.sut.SutInstance.connection_count​

aip_sdk.sut.SutInstance.connection_count: int = data.get('connection_count', 0)

No docstring is defined in the source.

aip_sdk.sut.SutInstance.connections​

aip_sdk.sut.SutInstance.connections() -> list[Connection]

List all connections for this SUT.

Returns

  • list[Connection]: List of Connection instances

aip_sdk.sut.SutInstance.created_at​

aip_sdk.sut.SutInstance.created_at: datetime | None = parse_dt(data['created_at'])

No docstring is defined in the source.

aip_sdk.sut.SutInstance.delete​

aip_sdk.sut.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.sut.SutInstance.id​

aip_sdk.sut.SutInstance.id: str = data['id']

No docstring is defined in the source.

aip_sdk.sut.SutInstance.name​

aip_sdk.sut.SutInstance.name: str = data['name']

No docstring is defined in the source.

aip_sdk.sut.SutInstance.owner​

aip_sdk.sut.SutInstance.owner: str | None = data.get('owner')

No docstring is defined in the source.

aip_sdk.sut.SutInstance.project_id​

aip_sdk.sut.SutInstance.project_id: str | None = data.get('project_id')

No docstring is defined in the source.

aip_sdk.sut.SutInstance.runs​

aip_sdk.sut.SutInstance.runs(page: int = 1, per_page: int = 20) -> dict[str, Any]

List evaluation runs that used this SUT.

Parameters

  • page int: Page number (1-indexed)
  • per_page int: Results per page

Returns

  • dict[str, Any]: Paginated response with run records

aip_sdk.sut.SutInstance.update​

aip_sdk.sut.SutInstance.update(name: str | None = None, version: str | None = None, owner: str | None = None) -> SutInstance

Update this SUT's metadata.

Parameters

  • name str | None: New SUT name
  • version str | None: New version string
  • owner str | None: New owner identifier

Returns

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.sut.SutInstance.updated_at​

aip_sdk.sut.SutInstance.updated_at: datetime | None = parse_dt(data['updated_at'])

No docstring is defined in the source.

aip_sdk.sut.SutInstance.version​

aip_sdk.sut.SutInstance.version: str = data['version']

No docstring is defined in the source.

aip_sdk.sut.aregister​

async aip_sdk.sut.aregister(name: str, endpoint: str, project_id: str, *, label: str = 'default', version: str = '1.0', owner: str | None = None, 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, client: AsyncAPIClient | None = None) -> SutInstance

Async convenience: register a SUT and add its first connection in a single call.

Drop-in async counterpart to the module-level register(). Suitable for use in notebooks and asyncio workflows without blocking the event loop.

Parameters

  • name str: SUT name.
  • endpoint str: SUT base URL (must be a valid HTTP/HTTPS URL).
  • project_id str: Project to register the SUT under.
  • label str: Connection environment label (default: "default").
  • version str: SUT version string (default: "1.0").
  • owner str | None: Owner/team identifier.
  • auth_type str: Connection auth method.
  • auth_header_name str | None: Auth header name.
  • auth_header_value str | None: Plaintext credential.
  • model_params dict[str, Any] | None: Static SUT protocol parameters.
  • sut_protocol str | None: Invocation protocol.
  • gdi_schema str | None: GDI dataset schema.
  • task_type str | None: Task discriminator for task-scoped schemas.
  • sut_streaming bool: Stream the SUT response so evaluation records true time-to-first-byte instead of total round-trip. Off by default.
  • client AsyncAPIClient | None: Optional pre-configured async API client.

Returns

  • SutInstance: class:SutInstance — same shape as the sync variant.

Raises

Example:

sut = await aip.sut.aregister(
name="my-model",
endpoint="https://api.openai.com/v1/chat/completions",
project_id="proj-abc123",
)

aip_sdk.sut.get_sut​

aip_sdk.sut.get_sut(sut_id: str, client: APIClient | None = None) -> SutInstance

Get a registered SUT by ID.

Parameters

  • sut_id str: SUT registration ID.
  • client APIClient | None: Optional API client.

Returns

Raises

Examples:

sut = aip.get_sut("sut_abc123")

aip_sdk.sut.list_suts​

aip_sdk.sut.list_suts(project_id: str | None = None, page: int = 1, per_page: int = 100, client: APIClient | None = None, *, workspace_id: str | None = None, all_workspaces: bool = False) -> list[SutInstance]

List registered SUTs.

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

  • project_id str | None: Scope the listing to this project, which determines its workspace. Not combinable with workspace_id.
  • page int: Page number (1-based).
  • per_page int: Items per page (max 100).
  • client APIClient | None: Optional API client.
  • workspace_id str | None: Return only SUTs in this workspace.
  • all_workspaces bool: Read across every workspace you can access.

Returns

  • list[SutInstance]: List of SutInstance objects.

Raises

Examples:

suts = aip.list_suts()
suts = aip.list_suts(project_id="proj_123")

aip_sdk.sut.register​

aip_sdk.sut.register(name: str, endpoint: str, project_id: str, *, label: str = 'default', version: str = '1.0', owner: str | None = None, 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, client: APIClient | None = None) -> SutInstance

Register a SUT and add its first connection in a single call.

This is the recommended entry point for new integrations. It collapses Sut.register() + SutInstance.add_connection() into one call. Use the two-step API (Sut.register() then SutInstance.add_connection()) when you need fine-grained control over auth_type, request_template, or gdi_schema.

Parameters

  • name str: SUT name.
  • endpoint str: SUT base URL (must be a valid HTTP/HTTPS URL).
  • project_id str: Project to register the SUT under.
  • label str: Connection environment label (default: "default").
  • version str: SUT version string (default: "1.0").
  • owner str | None: Owner/team identifier.
  • auth_type str: Connection auth method ("none", "bearer", "api_key", "basic").
  • auth_header_name str | None: Auth header name (e.g. "Authorization").
  • auth_header_value str | None: Plaintext credential, encrypted at rest by the platform.
  • model_params dict[str, Any] | None: Static parameters forwarded to the SUT protocol on every call.
  • sut_protocol str | None: Invocation protocol ("openai_chat", "rag_api", …).
  • gdi_schema str | None: GDI dataset schema ("gdi_text_v1", "gdi_image_v1", …).
  • task_type str | None: Task discriminator for task-scoped schemas, e.g. "detection" for gdi_image_v1.
  • sut_streaming bool: 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.
  • client APIClient | None: Optional pre-configured API client.

Returns

  • SutInstance: class:SutInstance with id, name, version, project_id.
  • SutInstance: The added connection is accessible via sut.connections().

Raises

Example:

import aip_sdk as aip

aip.init("https://aip.example.com", api_key="...")
sut = aip.sut.register(
name="my-model",
endpoint="https://api.openai.com/v1/chat/completions",
project_id="proj-abc123",
auth_type="bearer",
auth_header_value="sk-...",
sut_protocol="openai_chat",
gdi_schema="gdi_text_v1",
)
print(sut.id, sut.name)