Skip to content

Commit 8ced857

Browse files
njbrakegithub-actions[bot]
authored andcommitted
chore: regenerate SDK client core from Otari OpenAPI spec
1 parent 0796aa4 commit 8ced857

5 files changed

Lines changed: 285 additions & 14 deletions

File tree

src/otari/_client/api/batches_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def create_batch_v1_batches_post(
337337
) -> object:
338338
"""Create Batch
339339
340-
Create a batch of LLM requests for asynchronous processing.
340+
Create a batch of LLM requests for asynchronous processing. Authentication modes: - Master key + user field: Use specified user (must exist) - API key + user field: Use specified user (must exist) - API key without user field: Use virtual user created with API key
341341
342342
:param create_batch_request: (required)
343343
:type create_batch_request: CreateBatchRequest
@@ -405,7 +405,7 @@ def create_batch_v1_batches_post_with_http_info(
405405
) -> ApiResponse[object]:
406406
"""Create Batch
407407
408-
Create a batch of LLM requests for asynchronous processing.
408+
Create a batch of LLM requests for asynchronous processing. Authentication modes: - Master key + user field: Use specified user (must exist) - API key + user field: Use specified user (must exist) - API key without user field: Use virtual user created with API key
409409
410410
:param create_batch_request: (required)
411411
:type create_batch_request: CreateBatchRequest
@@ -473,7 +473,7 @@ def create_batch_v1_batches_post_without_preload_content(
473473
) -> RESTResponseType:
474474
"""Create Batch
475475
476-
Create a batch of LLM requests for asynchronous processing.
476+
Create a batch of LLM requests for asynchronous processing. Authentication modes: - Master key + user field: Use specified user (must exist) - API key + user field: Use specified user (must exist) - API key without user field: Use virtual user created with API key
477477
478478
:param create_batch_request: (required)
479479
:type create_batch_request: CreateBatchRequest
@@ -616,7 +616,7 @@ def list_batches_v1_batches_get(
616616
) -> object:
617617
"""List Batches
618618
619-
List batches for a provider.
619+
List batches for a provider. Non-master keys only see batches they own (plus legacy batches without an ownership marker); the page is filtered after the provider call, so a page may contain fewer than ``limit`` items.
620620
621621
:param provider: (required)
622622
:type provider: str
@@ -692,7 +692,7 @@ def list_batches_v1_batches_get_with_http_info(
692692
) -> ApiResponse[object]:
693693
"""List Batches
694694
695-
List batches for a provider.
695+
List batches for a provider. Non-master keys only see batches they own (plus legacy batches without an ownership marker); the page is filtered after the provider call, so a page may contain fewer than ``limit`` items.
696696
697697
:param provider: (required)
698698
:type provider: str
@@ -768,7 +768,7 @@ def list_batches_v1_batches_get_without_preload_content(
768768
) -> RESTResponseType:
769769
"""List Batches
770770
771-
List batches for a provider.
771+
List batches for a provider. Non-master keys only see batches they own (plus legacy batches without an ownership marker); the page is filtered after the provider call, so a page may contain fewer than ``limit`` items.
772772
773773
:param provider: (required)
774774
:type provider: str

src/otari/_client/api/keys_api.py

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,270 @@ def _list_keys_v1_keys_get_serialize(
11291129

11301130

11311131

1132+
@validate_call
1133+
def rotate_key_v1_keys_key_id_rotate_post(
1134+
self,
1135+
key_id: StrictStr,
1136+
_request_timeout: Union[
1137+
None,
1138+
Annotated[StrictFloat, Field(gt=0)],
1139+
Tuple[
1140+
Annotated[StrictFloat, Field(gt=0)],
1141+
Annotated[StrictFloat, Field(gt=0)]
1142+
]
1143+
] = None,
1144+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1145+
_content_type: Optional[StrictStr] = None,
1146+
_headers: Optional[Dict[StrictStr, Any]] = None,
1147+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1148+
) -> CreateKeyResponse:
1149+
"""Rotate Key
1150+
1151+
Rotate an API key's secret in place. Requires master key authentication. Generates a new secret for the same key row (id, user, name, expiry, and metadata are preserved) and returns the new raw key once, using the same response shape as key creation. The previous secret stops authenticating immediately; there is no grace window.
1152+
1153+
:param key_id: (required)
1154+
:type key_id: str
1155+
:param _request_timeout: timeout setting for this request. If one
1156+
number provided, it will be total request
1157+
timeout. It can also be a pair (tuple) of
1158+
(connection, read) timeouts.
1159+
:type _request_timeout: int, tuple(int, int), optional
1160+
:param _request_auth: set to override the auth_settings for an a single
1161+
request; this effectively ignores the
1162+
authentication in the spec for a single request.
1163+
:type _request_auth: dict, optional
1164+
:param _content_type: force content-type for the request.
1165+
:type _content_type: str, Optional
1166+
:param _headers: set to override the headers for a single
1167+
request; this effectively ignores the headers
1168+
in the spec for a single request.
1169+
:type _headers: dict, optional
1170+
:param _host_index: set to override the host_index for a single
1171+
request; this effectively ignores the host_index
1172+
in the spec for a single request.
1173+
:type _host_index: int, optional
1174+
:return: Returns the result object.
1175+
""" # noqa: E501
1176+
1177+
_param = self._rotate_key_v1_keys_key_id_rotate_post_serialize(
1178+
key_id=key_id,
1179+
_request_auth=_request_auth,
1180+
_content_type=_content_type,
1181+
_headers=_headers,
1182+
_host_index=_host_index
1183+
)
1184+
1185+
_response_types_map: Dict[str, Optional[str]] = {
1186+
'200': "CreateKeyResponse",
1187+
'422': "HTTPValidationError",
1188+
}
1189+
response_data = self.api_client.call_api(
1190+
*_param,
1191+
_request_timeout=_request_timeout
1192+
)
1193+
response_data.read()
1194+
return self.api_client.response_deserialize(
1195+
response_data=response_data,
1196+
response_types_map=_response_types_map,
1197+
).data
1198+
1199+
1200+
@validate_call
1201+
def rotate_key_v1_keys_key_id_rotate_post_with_http_info(
1202+
self,
1203+
key_id: StrictStr,
1204+
_request_timeout: Union[
1205+
None,
1206+
Annotated[StrictFloat, Field(gt=0)],
1207+
Tuple[
1208+
Annotated[StrictFloat, Field(gt=0)],
1209+
Annotated[StrictFloat, Field(gt=0)]
1210+
]
1211+
] = None,
1212+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1213+
_content_type: Optional[StrictStr] = None,
1214+
_headers: Optional[Dict[StrictStr, Any]] = None,
1215+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1216+
) -> ApiResponse[CreateKeyResponse]:
1217+
"""Rotate Key
1218+
1219+
Rotate an API key's secret in place. Requires master key authentication. Generates a new secret for the same key row (id, user, name, expiry, and metadata are preserved) and returns the new raw key once, using the same response shape as key creation. The previous secret stops authenticating immediately; there is no grace window.
1220+
1221+
:param key_id: (required)
1222+
:type key_id: str
1223+
:param _request_timeout: timeout setting for this request. If one
1224+
number provided, it will be total request
1225+
timeout. It can also be a pair (tuple) of
1226+
(connection, read) timeouts.
1227+
:type _request_timeout: int, tuple(int, int), optional
1228+
:param _request_auth: set to override the auth_settings for an a single
1229+
request; this effectively ignores the
1230+
authentication in the spec for a single request.
1231+
:type _request_auth: dict, optional
1232+
:param _content_type: force content-type for the request.
1233+
:type _content_type: str, Optional
1234+
:param _headers: set to override the headers for a single
1235+
request; this effectively ignores the headers
1236+
in the spec for a single request.
1237+
:type _headers: dict, optional
1238+
:param _host_index: set to override the host_index for a single
1239+
request; this effectively ignores the host_index
1240+
in the spec for a single request.
1241+
:type _host_index: int, optional
1242+
:return: Returns the result object.
1243+
""" # noqa: E501
1244+
1245+
_param = self._rotate_key_v1_keys_key_id_rotate_post_serialize(
1246+
key_id=key_id,
1247+
_request_auth=_request_auth,
1248+
_content_type=_content_type,
1249+
_headers=_headers,
1250+
_host_index=_host_index
1251+
)
1252+
1253+
_response_types_map: Dict[str, Optional[str]] = {
1254+
'200': "CreateKeyResponse",
1255+
'422': "HTTPValidationError",
1256+
}
1257+
response_data = self.api_client.call_api(
1258+
*_param,
1259+
_request_timeout=_request_timeout
1260+
)
1261+
response_data.read()
1262+
return self.api_client.response_deserialize(
1263+
response_data=response_data,
1264+
response_types_map=_response_types_map,
1265+
)
1266+
1267+
1268+
@validate_call
1269+
def rotate_key_v1_keys_key_id_rotate_post_without_preload_content(
1270+
self,
1271+
key_id: StrictStr,
1272+
_request_timeout: Union[
1273+
None,
1274+
Annotated[StrictFloat, Field(gt=0)],
1275+
Tuple[
1276+
Annotated[StrictFloat, Field(gt=0)],
1277+
Annotated[StrictFloat, Field(gt=0)]
1278+
]
1279+
] = None,
1280+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1281+
_content_type: Optional[StrictStr] = None,
1282+
_headers: Optional[Dict[StrictStr, Any]] = None,
1283+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1284+
) -> RESTResponseType:
1285+
"""Rotate Key
1286+
1287+
Rotate an API key's secret in place. Requires master key authentication. Generates a new secret for the same key row (id, user, name, expiry, and metadata are preserved) and returns the new raw key once, using the same response shape as key creation. The previous secret stops authenticating immediately; there is no grace window.
1288+
1289+
:param key_id: (required)
1290+
:type key_id: str
1291+
:param _request_timeout: timeout setting for this request. If one
1292+
number provided, it will be total request
1293+
timeout. It can also be a pair (tuple) of
1294+
(connection, read) timeouts.
1295+
:type _request_timeout: int, tuple(int, int), optional
1296+
:param _request_auth: set to override the auth_settings for an a single
1297+
request; this effectively ignores the
1298+
authentication in the spec for a single request.
1299+
:type _request_auth: dict, optional
1300+
:param _content_type: force content-type for the request.
1301+
:type _content_type: str, Optional
1302+
:param _headers: set to override the headers for a single
1303+
request; this effectively ignores the headers
1304+
in the spec for a single request.
1305+
:type _headers: dict, optional
1306+
:param _host_index: set to override the host_index for a single
1307+
request; this effectively ignores the host_index
1308+
in the spec for a single request.
1309+
:type _host_index: int, optional
1310+
:return: Returns the result object.
1311+
""" # noqa: E501
1312+
1313+
_param = self._rotate_key_v1_keys_key_id_rotate_post_serialize(
1314+
key_id=key_id,
1315+
_request_auth=_request_auth,
1316+
_content_type=_content_type,
1317+
_headers=_headers,
1318+
_host_index=_host_index
1319+
)
1320+
1321+
_response_types_map: Dict[str, Optional[str]] = {
1322+
'200': "CreateKeyResponse",
1323+
'422': "HTTPValidationError",
1324+
}
1325+
response_data = self.api_client.call_api(
1326+
*_param,
1327+
_request_timeout=_request_timeout
1328+
)
1329+
return response_data.response
1330+
1331+
1332+
def _rotate_key_v1_keys_key_id_rotate_post_serialize(
1333+
self,
1334+
key_id,
1335+
_request_auth,
1336+
_content_type,
1337+
_headers,
1338+
_host_index,
1339+
) -> RequestSerialized:
1340+
1341+
_host = None
1342+
1343+
_collection_formats: Dict[str, str] = {
1344+
}
1345+
1346+
_path_params: Dict[str, str] = {}
1347+
_query_params: List[Tuple[str, str]] = []
1348+
_header_params: Dict[str, Optional[str]] = _headers or {}
1349+
_form_params: List[Tuple[str, str]] = []
1350+
_files: Dict[
1351+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1352+
] = {}
1353+
_body_params: Optional[bytes] = None
1354+
1355+
# process the path parameters
1356+
if key_id is not None:
1357+
_path_params['key_id'] = key_id
1358+
# process the query parameters
1359+
# process the header parameters
1360+
# process the form parameters
1361+
# process the body parameter
1362+
1363+
1364+
# set the HTTP header `Accept`
1365+
if 'Accept' not in _header_params:
1366+
_header_params['Accept'] = self.api_client.select_header_accept(
1367+
[
1368+
'application/json'
1369+
]
1370+
)
1371+
1372+
1373+
# authentication setting
1374+
_auth_settings: List[str] = [
1375+
'ApiKeyAuth'
1376+
]
1377+
1378+
return self.api_client.param_serialize(
1379+
method='POST',
1380+
resource_path='/v1/keys/{key_id}/rotate',
1381+
path_params=_path_params,
1382+
query_params=_query_params,
1383+
header_params=_header_params,
1384+
body=_body_params,
1385+
post_params=_form_params,
1386+
files=_files,
1387+
auth_settings=_auth_settings,
1388+
collection_formats=_collection_formats,
1389+
_host=_host,
1390+
_request_auth=_request_auth
1391+
)
1392+
1393+
1394+
1395+
11321396
@validate_call
11331397
def update_key_v1_keys_key_id_patch(
11341398
self,

src/otari/_client/api/messages_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def create_message_v1_messages_post(
334334
) -> MessageResponse:
335335
"""Create Message
336336
337-
Anthropic Messages API-compatible endpoint. Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and (for non-tool-loop requests) get multi-attempt fallback across the resolved route. Tool-loop requests collapse to a single attempt — once ``on_first_response`` lock-in plumbing lands across the codebase, a follow-up will enable pre-lock-in fallback for tool-loop requests too.
337+
Anthropic Messages API-compatible endpoint. Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and get multi-attempt fallback across the resolved route, tool-loop requests included (fallback applies up to the pre-lock-in point, same as chat).
338338
339339
:param messages_request: (required)
340340
:type messages_request: MessagesRequest
@@ -402,7 +402,7 @@ def create_message_v1_messages_post_with_http_info(
402402
) -> ApiResponse[MessageResponse]:
403403
"""Create Message
404404
405-
Anthropic Messages API-compatible endpoint. Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and (for non-tool-loop requests) get multi-attempt fallback across the resolved route. Tool-loop requests collapse to a single attempt — once ``on_first_response`` lock-in plumbing lands across the codebase, a follow-up will enable pre-lock-in fallback for tool-loop requests too.
405+
Anthropic Messages API-compatible endpoint. Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and get multi-attempt fallback across the resolved route, tool-loop requests included (fallback applies up to the pre-lock-in point, same as chat).
406406
407407
:param messages_request: (required)
408408
:type messages_request: MessagesRequest
@@ -470,7 +470,7 @@ def create_message_v1_messages_post_without_preload_content(
470470
) -> RESTResponseType:
471471
"""Create Message
472472
473-
Anthropic Messages API-compatible endpoint. Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and (for non-tool-loop requests) get multi-attempt fallback across the resolved route. Tool-loop requests collapse to a single attempt — once ``on_first_response`` lock-in plumbing lands across the codebase, a follow-up will enable pre-lock-in fallback for tool-loop requests too.
473+
Anthropic Messages API-compatible endpoint. Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and get multi-attempt fallback across the resolved route, tool-loop requests included (fallback applies up to the pre-lock-in point, same as chat).
474474
475475
:param messages_request: (required)
476476
:type messages_request: MessagesRequest

0 commit comments

Comments
 (0)