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
2 changes: 2 additions & 0 deletions sdk-endpoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ GET /v1/routing/policies # not yet wrapped
POST /v1/routing/policies # not yet wrapped
DELETE /v1/routing/policies/{name} # not yet wrapped
POST /v1/routing/policies/explain # not yet wrapped
POST /v1/routing/preferences/rank # not yet wrapped
GET /v1/routing/status # not yet wrapped
# Pricing refresh workflow
POST /v1/pricing/refresh # not yet wrapped
POST /v1/pricing/refresh/confirm # not yet wrapped
Expand Down
16 changes: 16 additions & 0 deletions src/otari/_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"KeyInfo",
"KnownProviderSchema",
"KnownProviderSummarySchema",
"LearnedPolicy",
"LocationInner",
"MRAnthropicTypesThinkingBlockThinkingBlock",
"MRAnyLlmTypesMessagesThinkingBlock",
Expand Down Expand Up @@ -294,6 +295,7 @@
"ModerationResult",
"PolicyRequest",
"PolicyResponse",
"PoolStatus",
"PricingRefreshChangeResponse",
"PricingRefreshConfirmationResponse",
"PricingRefreshPreviewResponse",
Expand All @@ -308,11 +310,16 @@
"RRRerankMeta",
"RRRerankResult",
"RRRerankUsage",
"RankRequest",
"RankResponse",
"RecordedPool",
"ReencryptProviderCredentialsResponse",
"RerankRequest",
"RerankResponse",
"ResponsesRequest",
"RotateMasterKeyResponse",
"RouterStatus",
"ScoredExample",
"SearchRequest",
"SearchResponse",
"SearchResultItem",
Expand All @@ -323,6 +330,7 @@
"Stop",
"StoredProviderResponse",
"System",
"TaskPool",
"TestProviderRequest",
"TestProviderResponse",
"TestServiceRequest",
Expand Down Expand Up @@ -502,6 +510,7 @@
from otari._client.models.key_info import KeyInfo as KeyInfo
from otari._client.models.known_provider_schema import KnownProviderSchema as KnownProviderSchema
from otari._client.models.known_provider_summary_schema import KnownProviderSummarySchema as KnownProviderSummarySchema
from otari._client.models.learned_policy import LearnedPolicy as LearnedPolicy
from otari._client.models.location_inner import LocationInner as LocationInner
from otari._client.models.mr_anthropic_types_thinking_block_thinking_block import MRAnthropicTypesThinkingBlockThinkingBlock as MRAnthropicTypesThinkingBlockThinkingBlock
from otari._client.models.mr_any_llm_types_messages_thinking_block import MRAnyLlmTypesMessagesThinkingBlock as MRAnyLlmTypesMessagesThinkingBlock
Expand Down Expand Up @@ -643,6 +652,7 @@
from otari._client.models.moderation_result import ModerationResult as ModerationResult
from otari._client.models.policy_request import PolicyRequest as PolicyRequest
from otari._client.models.policy_response import PolicyResponse as PolicyResponse
from otari._client.models.pool_status import PoolStatus as PoolStatus
from otari._client.models.pricing_refresh_change_response import PricingRefreshChangeResponse as PricingRefreshChangeResponse
from otari._client.models.pricing_refresh_confirmation_response import PricingRefreshConfirmationResponse as PricingRefreshConfirmationResponse
from otari._client.models.pricing_refresh_preview_response import PricingRefreshPreviewResponse as PricingRefreshPreviewResponse
Expand All @@ -657,11 +667,16 @@
from otari._client.models.rr_rerank_meta import RRRerankMeta as RRRerankMeta
from otari._client.models.rr_rerank_result import RRRerankResult as RRRerankResult
from otari._client.models.rr_rerank_usage import RRRerankUsage as RRRerankUsage
from otari._client.models.rank_request import RankRequest as RankRequest
from otari._client.models.rank_response import RankResponse as RankResponse
from otari._client.models.recorded_pool import RecordedPool as RecordedPool
from otari._client.models.reencrypt_provider_credentials_response import ReencryptProviderCredentialsResponse as ReencryptProviderCredentialsResponse
from otari._client.models.rerank_request import RerankRequest as RerankRequest
from otari._client.models.rerank_response import RerankResponse as RerankResponse
from otari._client.models.responses_request import ResponsesRequest as ResponsesRequest
from otari._client.models.rotate_master_key_response import RotateMasterKeyResponse as RotateMasterKeyResponse
from otari._client.models.router_status import RouterStatus as RouterStatus
from otari._client.models.scored_example import ScoredExample as ScoredExample
from otari._client.models.search_request import SearchRequest as SearchRequest
from otari._client.models.search_response import SearchResponse as SearchResponse
from otari._client.models.search_result_item import SearchResultItem as SearchResultItem
Expand All @@ -672,6 +687,7 @@
from otari._client.models.stop import Stop as Stop
from otari._client.models.stored_provider_response import StoredProviderResponse as StoredProviderResponse
from otari._client.models.system import System as System
from otari._client.models.task_pool import TaskPool as TaskPool
from otari._client.models.test_provider_request import TestProviderRequest as TestProviderRequest
from otari._client.models.test_provider_response import TestProviderResponse as TestProviderResponse
from otari._client.models.test_service_request import TestServiceRequest as TestServiceRequest
Expand Down
34 changes: 27 additions & 7 deletions src/otari/_client/api/models_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictStr
from pydantic import Field, StrictBool, StrictStr
from typing import Optional
from typing_extensions import Annotated
from otari._client.models.discoverable_models_response import DiscoverableModelsResponse
Expand Down Expand Up @@ -309,6 +309,7 @@ def _get_model_v1_models_model_id_get_serialize(
@validate_call
def list_discoverable_models_v1_models_discoverable_get(
self,
refresh: Annotated[Optional[StrictBool], Field(description="Re-dial every provider instead of answering from the discovery cache.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -324,8 +325,10 @@ def list_discoverable_models_v1_models_discoverable_get(
) -> DiscoverableModelsResponse:
"""List Discoverable Models

List every model the configured provider credentials can reach. Operator-facing counterpart to GET /v1/models, which serves a curated catalog to API callers. This reports each provider separately and keeps its error, so a provider with a bad key is distinguishable from one with no models. It is master-key gated because a provider error message describes the gateway's own configuration.
List every model the configured provider credentials can reach. Operator-facing counterpart to GET /v1/models, which serves a curated catalog to API callers. This reports each provider separately and keeps its error, so a provider with a bad key is distinguishable from one with no models. It is master-key gated because a provider error message describes the gateway's own configuration. Answers from the discovery cache, which a background refresher keeps warm, so the call does not wait on a slow or unreachable provider. Each provider carries the ``checked_at`` its result was produced at; a null one has not been dialed yet. Pass ``refresh=true`` to force a live re-dial of every provider.

:param refresh: Re-dial every provider instead of answering from the discovery cache.
:type refresh: bool
: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 All @@ -349,6 +352,7 @@ def list_discoverable_models_v1_models_discoverable_get(
""" # noqa: E501

_param = self._list_discoverable_models_v1_models_discoverable_get_serialize(
refresh=refresh,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -357,6 +361,7 @@ def list_discoverable_models_v1_models_discoverable_get(

_response_types_map: Dict[str, Optional[str]] = {
'200': "DiscoverableModelsResponse",
'422': "HTTPValidationError",
}
response_data = self.api_client.call_api(
*_param,
Expand All @@ -372,6 +377,7 @@ def list_discoverable_models_v1_models_discoverable_get(
@validate_call
def list_discoverable_models_v1_models_discoverable_get_with_http_info(
self,
refresh: Annotated[Optional[StrictBool], Field(description="Re-dial every provider instead of answering from the discovery cache.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -387,8 +393,10 @@ def list_discoverable_models_v1_models_discoverable_get_with_http_info(
) -> ApiResponse[DiscoverableModelsResponse]:
"""List Discoverable Models

List every model the configured provider credentials can reach. Operator-facing counterpart to GET /v1/models, which serves a curated catalog to API callers. This reports each provider separately and keeps its error, so a provider with a bad key is distinguishable from one with no models. It is master-key gated because a provider error message describes the gateway's own configuration.
List every model the configured provider credentials can reach. Operator-facing counterpart to GET /v1/models, which serves a curated catalog to API callers. This reports each provider separately and keeps its error, so a provider with a bad key is distinguishable from one with no models. It is master-key gated because a provider error message describes the gateway's own configuration. Answers from the discovery cache, which a background refresher keeps warm, so the call does not wait on a slow or unreachable provider. Each provider carries the ``checked_at`` its result was produced at; a null one has not been dialed yet. Pass ``refresh=true`` to force a live re-dial of every provider.

:param refresh: Re-dial every provider instead of answering from the discovery cache.
:type refresh: bool
: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 All @@ -412,6 +420,7 @@ def list_discoverable_models_v1_models_discoverable_get_with_http_info(
""" # noqa: E501

_param = self._list_discoverable_models_v1_models_discoverable_get_serialize(
refresh=refresh,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -420,6 +429,7 @@ def list_discoverable_models_v1_models_discoverable_get_with_http_info(

_response_types_map: Dict[str, Optional[str]] = {
'200': "DiscoverableModelsResponse",
'422': "HTTPValidationError",
}
response_data = self.api_client.call_api(
*_param,
Expand All @@ -435,6 +445,7 @@ def list_discoverable_models_v1_models_discoverable_get_with_http_info(
@validate_call
def list_discoverable_models_v1_models_discoverable_get_without_preload_content(
self,
refresh: Annotated[Optional[StrictBool], Field(description="Re-dial every provider instead of answering from the discovery cache.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -450,8 +461,10 @@ def list_discoverable_models_v1_models_discoverable_get_without_preload_content(
) -> RESTResponseType:
"""List Discoverable Models

List every model the configured provider credentials can reach. Operator-facing counterpart to GET /v1/models, which serves a curated catalog to API callers. This reports each provider separately and keeps its error, so a provider with a bad key is distinguishable from one with no models. It is master-key gated because a provider error message describes the gateway's own configuration.
List every model the configured provider credentials can reach. Operator-facing counterpart to GET /v1/models, which serves a curated catalog to API callers. This reports each provider separately and keeps its error, so a provider with a bad key is distinguishable from one with no models. It is master-key gated because a provider error message describes the gateway's own configuration. Answers from the discovery cache, which a background refresher keeps warm, so the call does not wait on a slow or unreachable provider. Each provider carries the ``checked_at`` its result was produced at; a null one has not been dialed yet. Pass ``refresh=true`` to force a live re-dial of every provider.

:param refresh: Re-dial every provider instead of answering from the discovery cache.
:type refresh: bool
: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 All @@ -475,6 +488,7 @@ def list_discoverable_models_v1_models_discoverable_get_without_preload_content(
""" # noqa: E501

_param = self._list_discoverable_models_v1_models_discoverable_get_serialize(
refresh=refresh,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -483,6 +497,7 @@ def list_discoverable_models_v1_models_discoverable_get_without_preload_content(

_response_types_map: Dict[str, Optional[str]] = {
'200': "DiscoverableModelsResponse",
'422': "HTTPValidationError",
}
response_data = self.api_client.call_api(
*_param,
Expand All @@ -493,6 +508,7 @@ def list_discoverable_models_v1_models_discoverable_get_without_preload_content(

def _list_discoverable_models_v1_models_discoverable_get_serialize(
self,
refresh,
_request_auth,
_content_type,
_headers,
Expand All @@ -515,6 +531,10 @@ def _list_discoverable_models_v1_models_discoverable_get_serialize(

# process the path parameters
# process the query parameters
if refresh is not None:

_query_params.append(('refresh', refresh))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down Expand Up @@ -571,7 +591,7 @@ def list_model_metadata_v1_models_metadata_get(
) -> ModelMetadataResponse:
"""List Model Metadata

Per-model metadata for the dashboard's detail view, from models.dev. Covers every model models.dev lists under a configured provider, keyed by the ``instance:model`` selector the dashboard uses. ``available`` is false when enrichment is disabled (``models_dev_metadata``) or models.dev could not be reached; the response is then empty and the UI falls back to bundled data. Master-key gated: it describes the gateway's configured providers.
Per-model metadata for the dashboard's detail view, from models.dev. Covers every model models.dev lists under a configured provider, keyed by the ``instance:model`` selector the dashboard uses. ``available`` is false when enrichment is disabled (``models_dev_metadata``) or models.dev could not be reached; the response is then empty and the UI falls back to bundled data. Master-key gated: it describes the gateway's configured providers. Answers from the cached catalog, kept warm by a background refresher, so the dashboard never waits on the models.dev fetch timeout.

:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -634,7 +654,7 @@ def list_model_metadata_v1_models_metadata_get_with_http_info(
) -> ApiResponse[ModelMetadataResponse]:
"""List Model Metadata

Per-model metadata for the dashboard's detail view, from models.dev. Covers every model models.dev lists under a configured provider, keyed by the ``instance:model`` selector the dashboard uses. ``available`` is false when enrichment is disabled (``models_dev_metadata``) or models.dev could not be reached; the response is then empty and the UI falls back to bundled data. Master-key gated: it describes the gateway's configured providers.
Per-model metadata for the dashboard's detail view, from models.dev. Covers every model models.dev lists under a configured provider, keyed by the ``instance:model`` selector the dashboard uses. ``available`` is false when enrichment is disabled (``models_dev_metadata``) or models.dev could not be reached; the response is then empty and the UI falls back to bundled data. Master-key gated: it describes the gateway's configured providers. Answers from the cached catalog, kept warm by a background refresher, so the dashboard never waits on the models.dev fetch timeout.

:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -697,7 +717,7 @@ def list_model_metadata_v1_models_metadata_get_without_preload_content(
) -> RESTResponseType:
"""List Model Metadata

Per-model metadata for the dashboard's detail view, from models.dev. Covers every model models.dev lists under a configured provider, keyed by the ``instance:model`` selector the dashboard uses. ``available`` is false when enrichment is disabled (``models_dev_metadata``) or models.dev could not be reached; the response is then empty and the UI falls back to bundled data. Master-key gated: it describes the gateway's configured providers.
Per-model metadata for the dashboard's detail view, from models.dev. Covers every model models.dev lists under a configured provider, keyed by the ``instance:model`` selector the dashboard uses. ``available`` is false when enrichment is disabled (``models_dev_metadata``) or models.dev could not be reached; the response is then empty and the UI falls back to bundled data. Master-key gated: it describes the gateway's configured providers. Answers from the cached catalog, kept warm by a background refresher, so the dashboard never waits on the models.dev fetch timeout.

:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down
Loading
Loading