SAMProxy
SAM model of the Proxy kind, generated from the Smarter platform’s JSON Schema.
Do not edit: run scripts/generate_sam_models.py. See smarter.models.sam.
- class smarter.models.sam.proxy.SAMDependency(*, kind: str, name: str, **extra_data: Any)[source]
Bases:
SAMModelA resource that depends on the resource that a manifest describes.
- kind: str
Kind[String]: The SAM kind of the resource that depends on this resource, e.g. LLMClient.
Read only.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.proxy.SAMProxyMetadata(*, annotations: None | list[dict[str, str | int | float | bool | date | datetime | UUID | bytes | list | dict[str, Any]]] = None, description: str | None, name: str, tags: list[str] | None = None, version: str | None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Proxy Manifest - Metadata class.
- annotations: None | list[dict[str, str | int | float | bool | date | datetime | UUID | bytes | list | dict[str, Any]]]
The manifest annotations.
- Used for storing arbitrary metadata as
key-value pairs. Example: [{‘smarter.sh/test-manifest/project-name’: ‘Scooby dooby do’}]. The key should be a valid url-friendly string. The value accepts multi-line string values (YAML block scalars) and various scalar types including str, int, float, bool, datetime.date, datetime.datetime, decimal.Decimal, uuid.UUID, bytes, list, dict.
- tags: list[str] | None
The tags of the manifest.
Used for generic resource categorization and search. Example: [‘tag1’, ‘tag2’]
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.proxy.SAMProxySpecAuth(*, header: str | None = 'Authorization', scheme: str | None = 'Bearer')[source]
Bases:
SAMModelSpec.auth: how the provider expects its API key.
- model_config = {'extra': 'forbid', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.proxy.SAMProxyStatus(*, accountNumber: str, apiKeySecret: str | None = None, created: datetime, dependencies: list[SAMDependency] | None = None, modified: datetime, recordLocator: str, upstreamUrl: str | None = None, url: str | None = None, username: str, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Proxy Manifest - Status class.
Read only. Besides ownership, it reports where the Proxy is, and where it forwards to.
- apiKeySecret: str | None
Proxy.status.apiKeySecret: The name of the Secret whose API key is added to requests: spec.apiKey, else the Provider’s.
None if there is none. Read only.
- created: datetime
The date in which this resource was created.
Read only.
- dependencies: list[SAMDependency] | None
Dependencies[List]: The resources that depend on this resource, and that must be deleted, or stop referring to it, before it can be deleted.
Lists only the resources that you can read. Read only.
- modified: datetime
The date in which this resource was most recently changed.
Read only.
- recordLocator: str
RecordLocator[String]: An optional identifier used to locate the resource record associated with this manifest.
Read only.
- upstreamUrl: str | None
Proxy.status.upstreamUrl: The base URL of the provider’s API, to which requests are forwarded: spec.baseUrl, else the Provider’s.
Read only.
- url: str | None
Proxy.status.url: The URL of the Proxy’s passthrough endpoint, to use as the base URL of the provider’s SDK.
Read only.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.proxy.SAMProxySpec(*, allowedPaths: list[str] | None = None, apiKey: str | None = None, auth: SAMProxySpecAuth | None = None, baseUrl: str | None = None, headers: dict[str, str] | None = None, isActive: bool | None = True, provider: str, timeout: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=600), None] | None = 120)[source]
Bases:
SAMModelSmarter API Proxy Manifest Proxy.spec.
- model_config = {'extra': 'forbid', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- allowedPaths: list[str] | None
Proxy.spec.allowedPaths[list]: glob patterns of the paths, relative to baseUrl, that callers may use, e.g. chat/completions or models/*.
Empty allows every path.
- apiKey: str | None
Proxy.spec.apiKey[str]: the name of the Secret that contains the provider’s API key.
It must belong to, or be shared with, the manifest’s owner. Defaults to the Provider’s API key.
- auth: SAMProxySpecAuth | None
Proxy.spec.auth[object]: how the provider expects its API key.
Defaults to Authorization: Bearer.
- baseUrl: str | None
Proxy.spec.baseUrl[str]: the base URL of the provider’s API, e.g. https://api.openai.com/v1/.
Defaults to the Provider’s base URL.
- headers: dict[str, str] | None
Proxy.spec.headers[dict]: other HTTP headers that are added to every request, e.g. anthropic-version.
They replace the caller’s headers of the same name.
- class smarter.models.sam.proxy.SAMProxy(*, apiVersion: str, kind: str, metadata: SAMProxyMetadata, spec: SAMProxySpec, status: SAMProxyStatus | None = None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Manifest - Proxy.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- metadata: SAMProxyMetadata
Proxy.metadata[obj]: Required, the Proxy metadata.
- spec: SAMProxySpec
Proxy.spec[obj]: Required, the Proxy specification.
- status: SAMProxyStatus | None
Proxy.status[obj]: Optional, Read-only.
Stateful status information about the Proxy.