aip_sdk.JudgeConnection
aip_sdk.JudgeConnection(data: dict[str, Any], client: APIClient)
A registered judge connection — a named LLM judge (model, endpoint, key).
Register a judge once, then reference it when scoring metrics instead of pasting raw credentials into eval configs. The API key is write-only: it is sent at registration and never returned, so it is not exposed as an attribute.
Attributes
idstr: Connection ID.namestr: Human-readable name, unique within a workspace.modelstr: Judge model id, e.g."gpt-4o-mini".base_urlstr | None: OpenAI-compatible base URL as stored, orNoneto use the platform default judge. A trailing slash and a trailing/chat/completionsare stripped on write, so this may differ from the string that was sent.project_idstr | None: Project this connection is scoped to, if any.workspace_idstr | None: Workspace this connection is scoped to, if any.created_atdatetime | None: When the connection was registered.updated_atdatetime | None: When the connection was last modified.
aip_sdk.JudgeConnection.base_url
aip_sdk.JudgeConnection.base_url: str | None = data.get('base_url')
No docstring is defined in the source.
aip_sdk.JudgeConnection.created_at
aip_sdk.JudgeConnection.created_at: datetime | None = parse_dt(data['created_at'])
No docstring is defined in the source.
aip_sdk.JudgeConnection.delete
aip_sdk.JudgeConnection.delete() -> None
Delete this judge connection.
Raises
JudgeConnectionNotFoundError: If the connection 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 connection's workspace. A platform admin must be a member of that workspace too.AuthError: If credentials are missing or invalid.APIError: If the deletion otherwise fails.
aip_sdk.JudgeConnection.id
aip_sdk.JudgeConnection.id: str = data['id']
No docstring is defined in the source.
aip_sdk.JudgeConnection.model
aip_sdk.JudgeConnection.model: str = data['model']
No docstring is defined in the source.
aip_sdk.JudgeConnection.name
aip_sdk.JudgeConnection.name: str = data['name']
No docstring is defined in the source.
aip_sdk.JudgeConnection.project_id
aip_sdk.JudgeConnection.project_id: str | None = data.get('project_id')
No docstring is defined in the source.
aip_sdk.JudgeConnection.test
aip_sdk.JudgeConnection.test() -> JudgeTestResult
Run a live test call through this connection's model, endpoint, and key.
Issues a minimal chat completion to confirm the judge is reachable, the
credential is accepted, and the model is available. Never raises for a
judge-side failure — inspect JudgeTestResult.success and reason.
Returns
JudgeTestResultJudgeTestResult: the outcome, withsuccessand an actionablereason.
Raises
JudgeConnectionNotFoundError: If the connection no longer exists, or belongs to a workspace the caller is not a member of.AuthError: If credentials are missing or invalid.APIError: If the request otherwise fails.
Example:
result = connection.test()
if not result.success:
print(result.reason)
aip_sdk.JudgeConnection.update
aip_sdk.JudgeConnection.update(*, name: str | None = None, model: str | None = None, base_url: str | None = None, api_key: str | None = None, project_id: str | None = None) -> JudgeConnection
Update fields on this connection, or rotate its API key.
Only the fields you pass are changed. Pass api_key to replace the
stored credential; the previous key is discarded.
Parameters
namestr | None: New name; must stay unique within the workspace.modelstr | None: New judge model id.base_urlstr | None: New OpenAI-compatible base URL. A trailing slash and a trailing/chat/completionsare stripped before storage.api_keystr | None: New plaintext API key, encrypted at rest by the platform.project_idstr | None: Move the connection to this project.
Returns
JudgeConnectionJudgeConnection: the connection with updated fields.
Raises
JudgeConnectionNotFoundError: If the connection no longer exists, or belongs to a workspace the caller is not a member of.DuplicateJudgeConnectionError: Ifnameis already in use.ForbiddenError: If the caller is not an editor or admin of the connection'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.JudgeConnection.updated_at
aip_sdk.JudgeConnection.updated_at: datetime | None = parse_dt(data['updated_at'])
No docstring is defined in the source.
aip_sdk.JudgeConnection.workspace_id
aip_sdk.JudgeConnection.workspace_id: str | None = data.get('workspace_id')
No docstring is defined in the source.