From aa4bd5cb4253b31a142f3c0435a79cfaae5987dd Mon Sep 17 00:00:00 2001 From: nathan-roe-24 <241831745+nathan-roe-24@users.noreply.github.com> Date: Tue, 26 May 2026 05:39:28 +0000 Subject: [PATCH] Release v1.0.81 --- openapi/openapi.yml | 201 +++++++++++++++++ pyproject.toml | 2 +- src/roe/_generated/api/discovery/__init__.py | 1 + .../discovery_agent_engine_types_list.py | 166 ++++++++++++++ .../discovery_supported_models_list.py | 196 +++++++++++++++++ src/roe/_generated/api/tables/__init__.py | 1 + src/roe/_generated/api/tables/upload_table.py | 202 ++++++++++++++++++ src/roe/_generated/models/__init__.py | 12 ++ .../models/agent_engine_type_list.py | 115 ++++++++++ .../agent_engine_type_list_engines_item.py | 65 ++++++ .../_generated/models/supported_llm_model.py | 156 ++++++++++++++ .../models/supported_llm_model_list.py | 111 ++++++++++ .../_generated/models/table_upload_request.py | 173 +++++++++++++++ .../models/table_upload_response.py | 99 +++++++++ uv.lock | 2 +- 15 files changed, 1500 insertions(+), 2 deletions(-) create mode 100644 src/roe/_generated/api/discovery/__init__.py create mode 100644 src/roe/_generated/api/discovery/discovery_agent_engine_types_list.py create mode 100644 src/roe/_generated/api/discovery/discovery_supported_models_list.py create mode 100644 src/roe/_generated/api/tables/__init__.py create mode 100644 src/roe/_generated/api/tables/upload_table.py create mode 100644 src/roe/_generated/models/agent_engine_type_list.py create mode 100644 src/roe/_generated/models/agent_engine_type_list_engines_item.py create mode 100644 src/roe/_generated/models/supported_llm_model.py create mode 100644 src/roe/_generated/models/supported_llm_model_list.py create mode 100644 src/roe/_generated/models/table_upload_request.py create mode 100644 src/roe/_generated/models/table_upload_response.py diff --git a/openapi/openapi.yml b/openapi/openapi.yml index d30f8a1..030e802 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -1209,6 +1209,31 @@ paths: format: uuid description: Organization ID. This is required for access control. It can be provided via query or request body depending on the endpoint. + /v1/agents/models/: + get: + operationId: discovery_supported_models_list + description: Returns non-deprecated text-capable model IDs accepted in engine_config.model, + with capability and context metadata. Use this before create_agent or create_agent_version + when choosing a model. The list is tenant-agnostic and excludes customer-specific + or deployment-specific providers. + summary: List supported model IDs + parameters: + - in: query + name: capability + schema: + type: string + description: 'Optional capability filter: image, audio, or video (text-capable + models are always included)' + tags: + - discovery + - sdk + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupportedLLMModelList' + description: '' /v1/agents/run/{agent_id}/: post: operationId: agents_run @@ -1621,6 +1646,24 @@ paths: value: error: Internal server error description: Internal server error + /v1/agents/types/: + get: + operationId: discovery_agent_engine_types_list + description: Returns the production engine_class_id values accepted by agent + creation APIs, plus human-readable metadata and input schemas. Use this before + create_agent or create_agent_version when choosing an engine and constructing + engine_config. + summary: List supported agent engine types + tags: + - discovery + - sdk + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AgentEngineTypeList' + description: '' /v1/policies/: get: operationId: policies_list @@ -1930,6 +1973,35 @@ paths: schema: $ref: '#/components/schemas/PolicyVersion' description: '' + /v1/tables/upload/: + post: + operationId: upload_table + description: Create a Roe table in the authenticated organization from an uploaded + CSV file. Organization API keys are scoped to one organization; if organization_id + is supplied, it must match that organization. + summary: Upload a CSV as a Roe table + tags: + - tables + - sdk + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/TableUploadRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TableUploadResponse' + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request /v1/users/current_user/: get: operationId: users_current_user_retrieve @@ -1964,6 +2036,30 @@ components: - data_type - key - value + AgentEngineTypeList: + type: object + description: Serializer for public agent engine type discovery. + properties: + engine_types: + type: array + items: + type: string + description: Valid agent engine_class_id values accepted by create-agent + APIs + total_count: + type: integer + description: Number of engine types returned + engines: + type: array + items: + type: object + additionalProperties: {} + description: Production agent engine metadata, including descriptions, input + schemas, and default engine_config values + required: + - engine_types + - engines + - total_count AgentExecutionRequestRequest: type: object description: Serializer for agent execution requests with dynamic input fields. @@ -2734,6 +2830,111 @@ components: - display_name - email - id + SupportedLLMModel: + type: object + description: Serializer for tenant-agnostic supported LLM metadata. + properties: + id: + type: string + description: Model identifier accepted in engine_config.model + providers: + type: array + items: + type: string + description: Non-customer-specific providers registered for this model + capabilities: + type: array + items: + type: string + description: Input capabilities supported by this model + context_window: + type: integer + description: Largest context window across global providers + max_output_tokens: + type: integer + description: Largest max output token limit across global providers + supports_system_message: + type: boolean + supports_temperature: + type: boolean + supports_reasoning_effort: + type: boolean + supports_json_output: + type: boolean + supports_json_schema: + type: boolean + required: + - capabilities + - context_window + - id + - max_output_tokens + - providers + - supports_json_output + - supports_json_schema + - supports_reasoning_effort + - supports_system_message + - supports_temperature + SupportedLLMModelList: + type: object + description: Serializer for non-deprecated LLM discovery. + properties: + models: + type: array + items: + $ref: '#/components/schemas/SupportedLLMModel' + total_count: + type: integer + tenant_scope: + type: string + description: Scope of the model list; this endpoint returns all-tenants + models + required: + - models + - tenant_scope + - total_count + TableUploadRequest: + type: object + description: Serializer for public CSV table uploads. + properties: + table_name: + type: string + minLength: 1 + description: Name of the Roe table to create from the uploaded CSV + maxLength: 128 + file: + type: string + format: binary + description: CSV file to upload + with_headers: + type: boolean + default: true + description: Whether the first row of the CSV contains column headers + organization_id: + type: + - string + - 'null' + format: uuid + description: Optional organization ID. Organization API keys are already + scoped to one organization; if supplied, this must match that organization. + required: + - file + - table_name + TableUploadResponse: + type: object + description: Response payload for a public CSV table upload. + properties: + table_name: + type: string + description: Created Roe table name + organization_id: + type: string + format: uuid + description: Organization that owns the table + summary: + description: ClickHouse import summary for the uploaded file + required: + - organization_id + - table_name UpdatePolicy: type: object description: Serializer for updating policy metadata (name, description) diff --git a/pyproject.toml b/pyproject.toml index ecc87c5..b6652ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "roe-ai" -version = "1.0.801" +version = "1.0.81" authors = [ { name = "Roe AI", email = "founders@roe-ai.com" }, ] diff --git a/src/roe/_generated/api/discovery/__init__.py b/src/roe/_generated/api/discovery/__init__.py new file mode 100644 index 0000000..c9921b5 --- /dev/null +++ b/src/roe/_generated/api/discovery/__init__.py @@ -0,0 +1 @@ +""" Contains endpoint functions for accessing the API """ diff --git a/src/roe/_generated/api/discovery/discovery_agent_engine_types_list.py b/src/roe/_generated/api/discovery/discovery_agent_engine_types_list.py new file mode 100644 index 0000000..df4e940 --- /dev/null +++ b/src/roe/_generated/api/discovery/discovery_agent_engine_types_list.py @@ -0,0 +1,166 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.agent_engine_type_list import AgentEngineTypeList +from typing import cast + + + +def _get_kwargs( + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/agents/types/", + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AgentEngineTypeList | None: + if response.status_code == 200: + response_200 = AgentEngineTypeList.from_dict(response.json()) + + + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AgentEngineTypeList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + +) -> Response[AgentEngineTypeList]: + """ List supported agent engine types + + Returns the production engine_class_id values accepted by agent creation APIs, plus human-readable + metadata and input schemas. Use this before create_agent or create_agent_version when choosing an + engine and constructing engine_config. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentEngineTypeList] + """ + + + kwargs = _get_kwargs( + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + *, + client: AuthenticatedClient | Client, + +) -> AgentEngineTypeList | None: + """ List supported agent engine types + + Returns the production engine_class_id values accepted by agent creation APIs, plus human-readable + metadata and input schemas. Use this before create_agent or create_agent_version when choosing an + engine and constructing engine_config. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentEngineTypeList + """ + + + return sync_detailed( + client=client, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + +) -> Response[AgentEngineTypeList]: + """ List supported agent engine types + + Returns the production engine_class_id values accepted by agent creation APIs, plus human-readable + metadata and input schemas. Use this before create_agent or create_agent_version when choosing an + engine and constructing engine_config. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AgentEngineTypeList] + """ + + + kwargs = _get_kwargs( + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + *, + client: AuthenticatedClient | Client, + +) -> AgentEngineTypeList | None: + """ List supported agent engine types + + Returns the production engine_class_id values accepted by agent creation APIs, plus human-readable + metadata and input schemas. Use this before create_agent or create_agent_version when choosing an + engine and constructing engine_config. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AgentEngineTypeList + """ + + + return (await asyncio_detailed( + client=client, + + )).parsed diff --git a/src/roe/_generated/api/discovery/discovery_supported_models_list.py b/src/roe/_generated/api/discovery/discovery_supported_models_list.py new file mode 100644 index 0000000..d06799e --- /dev/null +++ b/src/roe/_generated/api/discovery/discovery_supported_models_list.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.supported_llm_model_list import SupportedLLMModelList +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + *, + capability: str | Unset = UNSET, + +) -> dict[str, Any]: + + + + + params: dict[str, Any] = {} + + params["capability"] = capability + + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/agents/models/", + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SupportedLLMModelList | None: + if response.status_code == 200: + response_200 = SupportedLLMModelList.from_dict(response.json()) + + + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[SupportedLLMModelList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + capability: str | Unset = UNSET, + +) -> Response[SupportedLLMModelList]: + """ List supported model IDs + + Returns non-deprecated text-capable model IDs accepted in engine_config.model, with capability and + context metadata. Use this before create_agent or create_agent_version when choosing a model. The + list is tenant-agnostic and excludes customer-specific or deployment-specific providers. + + Args: + capability (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[SupportedLLMModelList] + """ + + + kwargs = _get_kwargs( + capability=capability, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + *, + client: AuthenticatedClient | Client, + capability: str | Unset = UNSET, + +) -> SupportedLLMModelList | None: + """ List supported model IDs + + Returns non-deprecated text-capable model IDs accepted in engine_config.model, with capability and + context metadata. Use this before create_agent or create_agent_version when choosing a model. The + list is tenant-agnostic and excludes customer-specific or deployment-specific providers. + + Args: + capability (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + SupportedLLMModelList + """ + + + return sync_detailed( + client=client, +capability=capability, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + capability: str | Unset = UNSET, + +) -> Response[SupportedLLMModelList]: + """ List supported model IDs + + Returns non-deprecated text-capable model IDs accepted in engine_config.model, with capability and + context metadata. Use this before create_agent or create_agent_version when choosing a model. The + list is tenant-agnostic and excludes customer-specific or deployment-specific providers. + + Args: + capability (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[SupportedLLMModelList] + """ + + + kwargs = _get_kwargs( + capability=capability, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + *, + client: AuthenticatedClient | Client, + capability: str | Unset = UNSET, + +) -> SupportedLLMModelList | None: + """ List supported model IDs + + Returns non-deprecated text-capable model IDs accepted in engine_config.model, with capability and + context metadata. Use this before create_agent or create_agent_version when choosing a model. The + list is tenant-agnostic and excludes customer-specific or deployment-specific providers. + + Args: + capability (str | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + SupportedLLMModelList + """ + + + return (await asyncio_detailed( + client=client, +capability=capability, + + )).parsed diff --git a/src/roe/_generated/api/tables/__init__.py b/src/roe/_generated/api/tables/__init__.py new file mode 100644 index 0000000..c9921b5 --- /dev/null +++ b/src/roe/_generated/api/tables/__init__.py @@ -0,0 +1 @@ +""" Contains endpoint functions for accessing the API """ diff --git a/src/roe/_generated/api/tables/upload_table.py b/src/roe/_generated/api/tables/upload_table.py new file mode 100644 index 0000000..f265427 --- /dev/null +++ b/src/roe/_generated/api/tables/upload_table.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.error_response import ErrorResponse +from ...models.table_upload_request import TableUploadRequest +from ...models.table_upload_response import TableUploadResponse +from typing import cast + + + +def _get_kwargs( + *, + body: TableUploadRequest, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/tables/upload/", + } + + _kwargs["files"] = body.to_multipart() + + + + _kwargs["headers"] = headers + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorResponse | TableUploadResponse | None: + if response.status_code == 201: + response_201 = TableUploadResponse.from_dict(response.json()) + + + + return response_201 + + if response.status_code == 400: + response_400 = ErrorResponse.from_dict(response.json()) + + + + return response_400 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorResponse | TableUploadResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, + body: TableUploadRequest, + +) -> Response[ErrorResponse | TableUploadResponse]: + """ Upload a CSV as a Roe table + + Create a Roe table in the authenticated organization from an uploaded CSV file. Organization API + keys are scoped to one organization; if organization_id is supplied, it must match that + organization. + + Args: + body (TableUploadRequest): Serializer for public CSV table uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | TableUploadResponse] + """ + + + kwargs = _get_kwargs( + body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + *, + client: AuthenticatedClient | Client, + body: TableUploadRequest, + +) -> ErrorResponse | TableUploadResponse | None: + """ Upload a CSV as a Roe table + + Create a Roe table in the authenticated organization from an uploaded CSV file. Organization API + keys are scoped to one organization; if organization_id is supplied, it must match that + organization. + + Args: + body (TableUploadRequest): Serializer for public CSV table uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | TableUploadResponse + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, + body: TableUploadRequest, + +) -> Response[ErrorResponse | TableUploadResponse]: + """ Upload a CSV as a Roe table + + Create a Roe table in the authenticated organization from an uploaded CSV file. Organization API + keys are scoped to one organization; if organization_id is supplied, it must match that + organization. + + Args: + body (TableUploadRequest): Serializer for public CSV table uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ErrorResponse | TableUploadResponse] + """ + + + kwargs = _get_kwargs( + body=body, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + *, + client: AuthenticatedClient | Client, + body: TableUploadRequest, + +) -> ErrorResponse | TableUploadResponse | None: + """ Upload a CSV as a Roe table + + Create a Roe table in the authenticated organization from an uploaded CSV file. Organization API + keys are scoped to one organization; if organization_id is supplied, it must match that + organization. + + Args: + body (TableUploadRequest): Serializer for public CSV table uploads. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ErrorResponse | TableUploadResponse + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/src/roe/_generated/models/__init__.py b/src/roe/_generated/models/__init__.py index 7572c7c..87132f6 100644 --- a/src/roe/_generated/models/__init__.py +++ b/src/roe/_generated/models/__init__.py @@ -1,6 +1,8 @@ """ Contains all the data models used in inputs/outputs """ from .agent_datum import AgentDatum +from .agent_engine_type_list import AgentEngineTypeList +from .agent_engine_type_list_engines_item import AgentEngineTypeListEnginesItem from .agent_execution_request_request import AgentExecutionRequestRequest from .agent_input_definition import AgentInputDefinition from .agent_job_delete_data_response import AgentJobDeleteDataResponse @@ -32,12 +34,18 @@ from .policy import Policy from .policy_version import PolicyVersion from .policy_version_created_by import PolicyVersionCreatedBy +from .supported_llm_model import SupportedLLMModel +from .supported_llm_model_list import SupportedLLMModelList +from .table_upload_request import TableUploadRequest +from .table_upload_response import TableUploadResponse from .update_policy import UpdatePolicy from .update_policy_request import UpdatePolicyRequest from .user_info import UserInfo __all__ = ( "AgentDatum", + "AgentEngineTypeList", + "AgentEngineTypeListEnginesItem", "AgentExecutionRequestRequest", "AgentInputDefinition", "AgentJobDeleteDataResponse", @@ -69,6 +77,10 @@ "Policy", "PolicyVersion", "PolicyVersionCreatedBy", + "SupportedLLMModel", + "SupportedLLMModelList", + "TableUploadRequest", + "TableUploadResponse", "UpdatePolicy", "UpdatePolicyRequest", "UserInfo", diff --git a/src/roe/_generated/models/agent_engine_type_list.py b/src/roe/_generated/models/agent_engine_type_list.py new file mode 100644 index 0000000..0e07c91 --- /dev/null +++ b/src/roe/_generated/models/agent_engine_type_list.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.agent_engine_type_list_engines_item import AgentEngineTypeListEnginesItem + + + + + +T = TypeVar("T", bound="AgentEngineTypeList") + + + +@_attrs_define +class AgentEngineTypeList: + """ Serializer for public agent engine type discovery. + + Attributes: + engine_types (list[str]): Valid agent engine_class_id values accepted by create-agent APIs + total_count (int): Number of engine types returned + engines (list[AgentEngineTypeListEnginesItem]): Production agent engine metadata, including descriptions, input + schemas, and default engine_config values + """ + + engine_types: list[str] + total_count: int + engines: list[AgentEngineTypeListEnginesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + from ..models.agent_engine_type_list_engines_item import AgentEngineTypeListEnginesItem + engine_types = self.engine_types + + + + total_count = self.total_count + + engines = [] + for engines_item_data in self.engines: + engines_item = engines_item_data.to_dict() + engines.append(engines_item) + + + + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({ + "engine_types": engine_types, + "total_count": total_count, + "engines": engines, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.agent_engine_type_list_engines_item import AgentEngineTypeListEnginesItem + d = dict(src_dict) + engine_types = cast(list[str], d.pop("engine_types")) + + + total_count = d.pop("total_count") + + engines = [] + _engines = d.pop("engines") + for engines_item_data in (_engines): + engines_item = AgentEngineTypeListEnginesItem.from_dict(engines_item_data) + + + + engines.append(engines_item) + + + agent_engine_type_list = cls( + engine_types=engine_types, + total_count=total_count, + engines=engines, + ) + + + agent_engine_type_list.additional_properties = d + return agent_engine_type_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/roe/_generated/models/agent_engine_type_list_engines_item.py b/src/roe/_generated/models/agent_engine_type_list_engines_item.py new file mode 100644 index 0000000..7fca242 --- /dev/null +++ b/src/roe/_generated/models/agent_engine_type_list_engines_item.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + + + + + + +T = TypeVar("T", bound="AgentEngineTypeListEnginesItem") + + + +@_attrs_define +class AgentEngineTypeListEnginesItem: + """ + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + agent_engine_type_list_engines_item = cls( + ) + + + agent_engine_type_list_engines_item.additional_properties = d + return agent_engine_type_list_engines_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/roe/_generated/models/supported_llm_model.py b/src/roe/_generated/models/supported_llm_model.py new file mode 100644 index 0000000..f6c08bb --- /dev/null +++ b/src/roe/_generated/models/supported_llm_model.py @@ -0,0 +1,156 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + + + + + +T = TypeVar("T", bound="SupportedLLMModel") + + + +@_attrs_define +class SupportedLLMModel: + """ Serializer for tenant-agnostic supported LLM metadata. + + Attributes: + id (str): Model identifier accepted in engine_config.model + providers (list[str]): Non-customer-specific providers registered for this model + capabilities (list[str]): Input capabilities supported by this model + context_window (int): Largest context window across global providers + max_output_tokens (int): Largest max output token limit across global providers + supports_system_message (bool): + supports_temperature (bool): + supports_reasoning_effort (bool): + supports_json_output (bool): + supports_json_schema (bool): + """ + + id: str + providers: list[str] + capabilities: list[str] + context_window: int + max_output_tokens: int + supports_system_message: bool + supports_temperature: bool + supports_reasoning_effort: bool + supports_json_output: bool + supports_json_schema: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + id = self.id + + providers = self.providers + + + + capabilities = self.capabilities + + + + context_window = self.context_window + + max_output_tokens = self.max_output_tokens + + supports_system_message = self.supports_system_message + + supports_temperature = self.supports_temperature + + supports_reasoning_effort = self.supports_reasoning_effort + + supports_json_output = self.supports_json_output + + supports_json_schema = self.supports_json_schema + + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({ + "id": id, + "providers": providers, + "capabilities": capabilities, + "context_window": context_window, + "max_output_tokens": max_output_tokens, + "supports_system_message": supports_system_message, + "supports_temperature": supports_temperature, + "supports_reasoning_effort": supports_reasoning_effort, + "supports_json_output": supports_json_output, + "supports_json_schema": supports_json_schema, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + providers = cast(list[str], d.pop("providers")) + + + capabilities = cast(list[str], d.pop("capabilities")) + + + context_window = d.pop("context_window") + + max_output_tokens = d.pop("max_output_tokens") + + supports_system_message = d.pop("supports_system_message") + + supports_temperature = d.pop("supports_temperature") + + supports_reasoning_effort = d.pop("supports_reasoning_effort") + + supports_json_output = d.pop("supports_json_output") + + supports_json_schema = d.pop("supports_json_schema") + + supported_llm_model = cls( + id=id, + providers=providers, + capabilities=capabilities, + context_window=context_window, + max_output_tokens=max_output_tokens, + supports_system_message=supports_system_message, + supports_temperature=supports_temperature, + supports_reasoning_effort=supports_reasoning_effort, + supports_json_output=supports_json_output, + supports_json_schema=supports_json_schema, + ) + + + supported_llm_model.additional_properties = d + return supported_llm_model + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/roe/_generated/models/supported_llm_model_list.py b/src/roe/_generated/models/supported_llm_model_list.py new file mode 100644 index 0000000..65c2b88 --- /dev/null +++ b/src/roe/_generated/models/supported_llm_model_list.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.supported_llm_model import SupportedLLMModel + + + + + +T = TypeVar("T", bound="SupportedLLMModelList") + + + +@_attrs_define +class SupportedLLMModelList: + """ Serializer for non-deprecated LLM discovery. + + Attributes: + models (list[SupportedLLMModel]): + total_count (int): + tenant_scope (str): Scope of the model list; this endpoint returns all-tenants models + """ + + models: list[SupportedLLMModel] + total_count: int + tenant_scope: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + from ..models.supported_llm_model import SupportedLLMModel + models = [] + for models_item_data in self.models: + models_item = models_item_data.to_dict() + models.append(models_item) + + + + total_count = self.total_count + + tenant_scope = self.tenant_scope + + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({ + "models": models, + "total_count": total_count, + "tenant_scope": tenant_scope, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.supported_llm_model import SupportedLLMModel + d = dict(src_dict) + models = [] + _models = d.pop("models") + for models_item_data in (_models): + models_item = SupportedLLMModel.from_dict(models_item_data) + + + + models.append(models_item) + + + total_count = d.pop("total_count") + + tenant_scope = d.pop("tenant_scope") + + supported_llm_model_list = cls( + models=models, + total_count=total_count, + tenant_scope=tenant_scope, + ) + + + supported_llm_model_list.additional_properties = d + return supported_llm_model_list + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/roe/_generated/models/table_upload_request.py b/src/roe/_generated/models/table_upload_request.py new file mode 100644 index 0000000..7c715ee --- /dev/null +++ b/src/roe/_generated/models/table_upload_request.py @@ -0,0 +1,173 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +import json +from .. import types + +from ..types import UNSET, Unset + +from ..types import File, FileTypes +from ..types import UNSET, Unset +from io import BytesIO +from typing import cast +from uuid import UUID + + + + + + +T = TypeVar("T", bound="TableUploadRequest") + + + +@_attrs_define +class TableUploadRequest: + """ Serializer for public CSV table uploads. + + Attributes: + table_name (str): Name of the Roe table to create from the uploaded CSV + file (File): CSV file to upload + with_headers (bool | Unset): Whether the first row of the CSV contains column headers Default: True. + organization_id (None | Unset | UUID): Optional organization ID. Organization API keys are already scoped to one + organization; if supplied, this must match that organization. + """ + + table_name: str + file: File + with_headers: bool | Unset = True + organization_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + table_name = self.table_name + + file = self.file.to_tuple() + + + with_headers = self.with_headers + + organization_id: None | str | Unset + if isinstance(self.organization_id, Unset): + organization_id = UNSET + elif isinstance(self.organization_id, UUID): + organization_id = str(self.organization_id) + else: + organization_id = self.organization_id + + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({ + "table_name": table_name, + "file": file, + }) + if with_headers is not UNSET: + field_dict["with_headers"] = with_headers + if organization_id is not UNSET: + field_dict["organization_id"] = organization_id + + return field_dict + + + def to_multipart(self) -> types.RequestFiles: + files: types.RequestFiles = [] + + files.append(("table_name", (None, str(self.table_name).encode(), "text/plain"))) + + + + files.append(("file", self.file.to_tuple())) + + + + if not isinstance(self.with_headers, Unset): + files.append(("with_headers", (None, str(self.with_headers).encode(), "text/plain"))) + + + + if not isinstance(self.organization_id, Unset): + if isinstance(self.organization_id, UUID): + + files.append(("organization_id", (None, str(self.organization_id), "text/plain"))) + else: + files.append(("organization_id", (None, str(self.organization_id).encode(), "text/plain"))) + + + + for prop_name, prop in self.additional_properties.items(): + files.append((prop_name, (None, str(prop).encode(), "text/plain"))) + + + + return files + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + table_name = d.pop("table_name") + + file = File( + payload = BytesIO(d.pop("file")) + ) + + + + + with_headers = d.pop("with_headers", UNSET) + + def _parse_organization_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + organization_id_type_0 = UUID(data) + + + + return organization_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + organization_id = _parse_organization_id(d.pop("organization_id", UNSET)) + + + table_upload_request = cls( + table_name=table_name, + file=file, + with_headers=with_headers, + organization_id=organization_id, + ) + + + table_upload_request.additional_properties = d + return table_upload_request + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/roe/_generated/models/table_upload_response.py b/src/roe/_generated/models/table_upload_response.py new file mode 100644 index 0000000..ed098ec --- /dev/null +++ b/src/roe/_generated/models/table_upload_response.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from uuid import UUID + + + + + + +T = TypeVar("T", bound="TableUploadResponse") + + + +@_attrs_define +class TableUploadResponse: + """ Response payload for a public CSV table upload. + + Attributes: + table_name (str): Created Roe table name + organization_id (UUID): Organization that owns the table + summary (Any | Unset): ClickHouse import summary for the uploaded file + """ + + table_name: str + organization_id: UUID + summary: Any | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + table_name = self.table_name + + organization_id = str(self.organization_id) + + summary = self.summary + + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({ + "table_name": table_name, + "organization_id": organization_id, + }) + if summary is not UNSET: + field_dict["summary"] = summary + + return field_dict + + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + table_name = d.pop("table_name") + + organization_id = UUID(d.pop("organization_id")) + + + + + summary = d.pop("summary", UNSET) + + table_upload_response = cls( + table_name=table_name, + organization_id=organization_id, + summary=summary, + ) + + + table_upload_response.additional_properties = d + return table_upload_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/uv.lock b/uv.lock index eda1dc1..84e0eae 100644 --- a/uv.lock +++ b/uv.lock @@ -454,7 +454,7 @@ wheels = [ [[package]] name = "roe-ai" -version = "1.0.801" +version = "1.0.81" source = { editable = "." } dependencies = [ { name = "attrs" },