Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/otari/_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"BudgetResponse",
"BuiltInGuardrailCatalog",
"BuiltInGuardrailSpec",
"CCCacheCreationTokenDetails",
"CCChatCompletionAudio",
"CCChatCompletionMessage",
"CCChatCompletionMessageCustomToolCall",
Expand All @@ -133,15 +134,21 @@
"CCCustom",
"CCFunction",
"CCFunctionCall",
"CCImageContent",
"CCImageURL",
"CCKCacheCreationTokenDetails",
"CCKChatCompletionTokenLogprob",
"CCKChoiceDelta",
"CCKChoiceDeltaAudio",
"CCKChoiceDeltaFunctionCall",
"CCKChoiceDeltaToolCall",
"CCKChoiceDeltaToolCallFunction",
"CCKChoiceLogprobs",
"CCKChunkChoice",
"CCKCompletionTokensDetails",
"CCKCompletionUsage",
"CCKImageContent",
"CCKImageURL",
"CCKPromptTokensDetails",
"CCKTopLogprob",
"CCPromptTokensDetails",
Expand Down Expand Up @@ -737,6 +744,7 @@
from otari._client.models.budget_response import BudgetResponse as BudgetResponse
from otari._client.models.built_in_guardrail_catalog import BuiltInGuardrailCatalog as BuiltInGuardrailCatalog
from otari._client.models.built_in_guardrail_spec import BuiltInGuardrailSpec as BuiltInGuardrailSpec
from otari._client.models.cc_cache_creation_token_details import CCCacheCreationTokenDetails as CCCacheCreationTokenDetails
from otari._client.models.cc_chat_completion_audio import CCChatCompletionAudio as CCChatCompletionAudio
from otari._client.models.cc_chat_completion_message import CCChatCompletionMessage as CCChatCompletionMessage
from otari._client.models.cc_chat_completion_message_custom_tool_call import CCChatCompletionMessageCustomToolCall as CCChatCompletionMessageCustomToolCall
Expand All @@ -750,15 +758,21 @@
from otari._client.models.cc_custom import CCCustom as CCCustom
from otari._client.models.cc_function import CCFunction as CCFunction
from otari._client.models.cc_function_call import CCFunctionCall as CCFunctionCall
from otari._client.models.cc_image_content import CCImageContent as CCImageContent
from otari._client.models.cc_image_url import CCImageURL as CCImageURL
from otari._client.models.cck_cache_creation_token_details import CCKCacheCreationTokenDetails as CCKCacheCreationTokenDetails
from otari._client.models.cck_chat_completion_token_logprob import CCKChatCompletionTokenLogprob as CCKChatCompletionTokenLogprob
from otari._client.models.cck_choice_delta import CCKChoiceDelta as CCKChoiceDelta
from otari._client.models.cck_choice_delta_audio import CCKChoiceDeltaAudio as CCKChoiceDeltaAudio
from otari._client.models.cck_choice_delta_function_call import CCKChoiceDeltaFunctionCall as CCKChoiceDeltaFunctionCall
from otari._client.models.cck_choice_delta_tool_call import CCKChoiceDeltaToolCall as CCKChoiceDeltaToolCall
from otari._client.models.cck_choice_delta_tool_call_function import CCKChoiceDeltaToolCallFunction as CCKChoiceDeltaToolCallFunction
from otari._client.models.cck_choice_logprobs import CCKChoiceLogprobs as CCKChoiceLogprobs
from otari._client.models.cck_chunk_choice import CCKChunkChoice as CCKChunkChoice
from otari._client.models.cck_completion_tokens_details import CCKCompletionTokensDetails as CCKCompletionTokensDetails
from otari._client.models.cck_completion_usage import CCKCompletionUsage as CCKCompletionUsage
from otari._client.models.cck_image_content import CCKImageContent as CCKImageContent
from otari._client.models.cck_image_url import CCKImageURL as CCKImageURL
from otari._client.models.cck_prompt_tokens_details import CCKPromptTokensDetails as CCKPromptTokensDetails
from otari._client.models.cck_top_logprob import CCKTopLogprob as CCKTopLogprob
from otari._client.models.cc_prompt_tokens_details import CCPromptTokensDetails as CCPromptTokensDetails
Expand Down
60 changes: 39 additions & 21 deletions src/otari/_client/api/files_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing_extensions import Annotated

from pydantic import Field, StrictBytes, StrictStr, field_validator
from typing import Any, Dict, Optional, Tuple, Union
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from uuid import UUID

Expand Down Expand Up @@ -1202,8 +1202,9 @@ def files_list_files(
workspace_id: Optional[UUID] = None,
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
after: Optional[StrictStr] = None,
after_id: Optional[StrictStr] = None,
order: Optional[StrictStr] = None,
page: Optional[StrictStr] = None,
ids: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -1219,7 +1220,7 @@ def files_list_files(
) -> Dict[str, object]:
"""List Files

List the authenticated user's uploaded files in the request's workspace. ``workspace_id`` narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it. Pages are cursor-based: ``after`` (OpenAI) or ``after_id`` (Anthropic) names the last file of the previous page, and ``has_more`` says whether to ask again. A cursor that has since been deleted or has expired is still a position; one the caller never owned is a 404.
List the authenticated user's uploaded files in the request's workspace. ``workspace_id`` narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it. Each flavor pages with its own cursor. OpenAI's ``after`` names the last file of the previous page, and ``has_more`` says whether to ask again. Anthropic's ``next_page`` is passed back as ``page``, and ``ids[]`` reads up to 100 named files in one page. A cursor whose file has since been deleted or has expired is still a position. An ``after`` the caller never owned is a 404, and a ``page`` token this gateway did not issue is a 400.

:param user:
:type user: str
Expand All @@ -1231,10 +1232,12 @@ def files_list_files(
:type limit: int
:param after:
:type after: str
:param after_id:
:type after_id: str
:param order:
:type order: str
:param page:
:type page: str
:param ids:
:type ids: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -1263,8 +1266,9 @@ def files_list_files(
workspace_id=workspace_id,
limit=limit,
after=after,
after_id=after_id,
order=order,
page=page,
ids=ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -1294,8 +1298,9 @@ def files_list_files_with_http_info(
workspace_id: Optional[UUID] = None,
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
after: Optional[StrictStr] = None,
after_id: Optional[StrictStr] = None,
order: Optional[StrictStr] = None,
page: Optional[StrictStr] = None,
ids: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -1311,7 +1316,7 @@ def files_list_files_with_http_info(
) -> ApiResponse[Dict[str, object]]:
"""List Files

List the authenticated user's uploaded files in the request's workspace. ``workspace_id`` narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it. Pages are cursor-based: ``after`` (OpenAI) or ``after_id`` (Anthropic) names the last file of the previous page, and ``has_more`` says whether to ask again. A cursor that has since been deleted or has expired is still a position; one the caller never owned is a 404.
List the authenticated user's uploaded files in the request's workspace. ``workspace_id`` narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it. Each flavor pages with its own cursor. OpenAI's ``after`` names the last file of the previous page, and ``has_more`` says whether to ask again. Anthropic's ``next_page`` is passed back as ``page``, and ``ids[]`` reads up to 100 named files in one page. A cursor whose file has since been deleted or has expired is still a position. An ``after`` the caller never owned is a 404, and a ``page`` token this gateway did not issue is a 400.

:param user:
:type user: str
Expand All @@ -1323,10 +1328,12 @@ def files_list_files_with_http_info(
:type limit: int
:param after:
:type after: str
:param after_id:
:type after_id: str
:param order:
:type order: str
:param page:
:type page: str
:param ids:
:type ids: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -1355,8 +1362,9 @@ def files_list_files_with_http_info(
workspace_id=workspace_id,
limit=limit,
after=after,
after_id=after_id,
order=order,
page=page,
ids=ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -1386,8 +1394,9 @@ def files_list_files_without_preload_content(
workspace_id: Optional[UUID] = None,
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
after: Optional[StrictStr] = None,
after_id: Optional[StrictStr] = None,
order: Optional[StrictStr] = None,
page: Optional[StrictStr] = None,
ids: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -1403,7 +1412,7 @@ def files_list_files_without_preload_content(
) -> RESTResponseType:
"""List Files

List the authenticated user's uploaded files in the request's workspace. ``workspace_id`` narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it. Pages are cursor-based: ``after`` (OpenAI) or ``after_id`` (Anthropic) names the last file of the previous page, and ``has_more`` says whether to ask again. A cursor that has since been deleted or has expired is still a position; one the caller never owned is a 404.
List the authenticated user's uploaded files in the request's workspace. ``workspace_id`` narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it. Each flavor pages with its own cursor. OpenAI's ``after`` names the last file of the previous page, and ``has_more`` says whether to ask again. Anthropic's ``next_page`` is passed back as ``page``, and ``ids[]`` reads up to 100 named files in one page. A cursor whose file has since been deleted or has expired is still a position. An ``after`` the caller never owned is a 404, and a ``page`` token this gateway did not issue is a 400.

:param user:
:type user: str
Expand All @@ -1415,10 +1424,12 @@ def files_list_files_without_preload_content(
:type limit: int
:param after:
:type after: str
:param after_id:
:type after_id: str
:param order:
:type order: str
:param page:
:type page: str
:param ids:
:type ids: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -1447,8 +1458,9 @@ def files_list_files_without_preload_content(
workspace_id=workspace_id,
limit=limit,
after=after,
after_id=after_id,
order=order,
page=page,
ids=ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -1473,8 +1485,9 @@ def _files_list_files_serialize(
workspace_id,
limit,
after,
after_id,
order,
page,
ids,
_request_auth,
_content_type,
_headers,
Expand All @@ -1484,6 +1497,7 @@ def _files_list_files_serialize(
_host = None

_collection_formats: Dict[str, str] = {
'ids[]': 'multi',
}

_path_params: Dict[str, str] = {}
Expand Down Expand Up @@ -1517,14 +1531,18 @@ def _files_list_files_serialize(

_query_params.append(('after', after))

if after_id is not None:

_query_params.append(('after_id', after_id))

if order is not None:

_query_params.append(('order', order))

if page is not None:

_query_params.append(('page', page))

if ids is not None:

_query_params.append(('ids[]', ids))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down
7 changes: 7 additions & 0 deletions src/otari/_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from otari._client.models.budget_response import BudgetResponse
from otari._client.models.built_in_guardrail_catalog import BuiltInGuardrailCatalog
from otari._client.models.built_in_guardrail_spec import BuiltInGuardrailSpec
from otari._client.models.cc_cache_creation_token_details import CCCacheCreationTokenDetails
from otari._client.models.cc_chat_completion_audio import CCChatCompletionAudio
from otari._client.models.cc_chat_completion_message import CCChatCompletionMessage
from otari._client.models.cc_chat_completion_message_custom_tool_call import CCChatCompletionMessageCustomToolCall
Expand All @@ -68,15 +69,21 @@
from otari._client.models.cc_custom import CCCustom
from otari._client.models.cc_function import CCFunction
from otari._client.models.cc_function_call import CCFunctionCall
from otari._client.models.cc_image_content import CCImageContent
from otari._client.models.cc_image_url import CCImageURL
from otari._client.models.cck_cache_creation_token_details import CCKCacheCreationTokenDetails
from otari._client.models.cck_chat_completion_token_logprob import CCKChatCompletionTokenLogprob
from otari._client.models.cck_choice_delta import CCKChoiceDelta
from otari._client.models.cck_choice_delta_audio import CCKChoiceDeltaAudio
from otari._client.models.cck_choice_delta_function_call import CCKChoiceDeltaFunctionCall
from otari._client.models.cck_choice_delta_tool_call import CCKChoiceDeltaToolCall
from otari._client.models.cck_choice_delta_tool_call_function import CCKChoiceDeltaToolCallFunction
from otari._client.models.cck_choice_logprobs import CCKChoiceLogprobs
from otari._client.models.cck_chunk_choice import CCKChunkChoice
from otari._client.models.cck_completion_tokens_details import CCKCompletionTokensDetails
from otari._client.models.cck_completion_usage import CCKCompletionUsage
from otari._client.models.cck_image_content import CCKImageContent
from otari._client.models.cck_image_url import CCKImageURL
from otari._client.models.cck_prompt_tokens_details import CCKPromptTokensDetails
from otari._client.models.cck_top_logprob import CCKTopLogprob
from otari._client.models.cc_prompt_tokens_details import CCPromptTokensDetails
Expand Down
2 changes: 1 addition & 1 deletion src/otari/_client/models/catalog_model_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CatalogModelDetail(BaseModel):
providers: List[StrictStr] = Field(description="The provider instances offering it, sorted.")
release_date: Optional[StrictStr] = None
resolves_to: Optional[StrictStr] = Field(default=None, description="The offering `selector` resolves to.")
selector: Optional[StrictStr] = Field(default=None, description="The id as a selector: send it as `model` and the model's cheapest offering answers. Null until the gateway has indexed the catalog.")
selector: Optional[StrictStr] = Field(default=None, description="The id as a selector: send it as `model` and the model's cheapest offering the caller can reach answers, the vendor's own provider first where it serves the model. Null until the gateway has indexed the catalog.")
selectors: List[StrictStr] = Field(description="Every offering's selector, so the list can be searched by one.")
unpriced_count: StrictInt = Field(description="How many offerings carry no price for this caller.")
vendor: Optional[StrictStr]
Expand Down
2 changes: 1 addition & 1 deletion src/otari/_client/models/catalog_model_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CatalogModelSummary(BaseModel):
providers: List[StrictStr] = Field(description="The provider instances offering it, sorted.")
release_date: Optional[StrictStr] = None
resolves_to: Optional[StrictStr] = Field(default=None, description="The offering `selector` resolves to.")
selector: Optional[StrictStr] = Field(default=None, description="The id as a selector: send it as `model` and the model's cheapest offering answers. Null until the gateway has indexed the catalog.")
selector: Optional[StrictStr] = Field(default=None, description="The id as a selector: send it as `model` and the model's cheapest offering the caller can reach answers, the vendor's own provider first where it serves the model. Null until the gateway has indexed the catalog.")
selectors: List[StrictStr] = Field(description="Every offering's selector, so the list can be searched by one.")
unpriced_count: StrictInt = Field(description="How many offerings carry no price for this caller.")
vendor: Optional[StrictStr]
Expand Down
2 changes: 1 addition & 1 deletion src/otari/_client/models/catalog_offering.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CatalogOffering(BaseModel):
provider_type: StrictStr = Field(description="The any-llm implementation behind the instance.")
quantization: Optional[StrictStr] = Field(default=None, description="From the provider's id, when it names one.")
selector: StrictStr = Field(description="What to send as `model`, in `instance:model` form.")
short_selector: Optional[StrictStr] = Field(default=None, description="A shorter spelling the gateway also accepts: the instance with the model's cleaned id (`fireworks:gpt-oss-120b`). Null where two offerings on the instance would share it, or until the gateway has indexed the catalog.")
short_selector: Optional[StrictStr] = Field(default=None, description="The pinned spelling the gateway also accepts for this offering: the instance with the model's catalog id (`fireworks:openai/gpt-oss-120b`), which pins the instance and reaches the model's cheapest offering on it. Null for a dearer sibling on the same instance, or until the gateway has indexed the catalog.")
usage_30d: Optional[OfferingUsage] = None
__properties: ClassVar[List[str]] = ["context_window", "credential", "discovered", "max_output_tokens", "metadata_input_price_per_million", "metadata_output_price_per_million", "price_reference", "price_source", "pricing", "provider", "provider_type", "quantization", "selector", "short_selector", "usage_30d"]

Expand Down
Loading
Loading