SAMProxy
smarter.models.sam.proxy
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
Bases:
smarter.models.sam.base.SAMModelA resource that depends on the resource that a manifest describes.
- class smarter.models.sam.proxy.SAMProxyMetadata
Bases:
smarter.models.sam.base.SAMModelSmarter API Proxy Manifest - Metadata class.
- annotations: None | list[dict[str, str | int | float | bool | datetime.date | datetime.datetime | Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$')] | uuid.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.
- class smarter.models.sam.proxy.SAMProxySpecAuth
Bases:
smarter.models.sam.base.SAMModelSpec.auth: how the provider expects its API key.
- class smarter.models.sam.proxy.SAMProxyStatus
Bases:
smarter.models.sam.base.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[smarter.models.sam.proxy.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.
- class smarter.models.sam.proxy.SAMProxySpec
Bases:
smarter.models.sam.base.SAMModelSmarter API Proxy Manifest Proxy.spec.
- 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: smarter.models.sam.proxy.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.
- provider: str
Proxy.spec.provider[str]: the name of the Provider whose API the Proxy forwards to, e.g. openai.
It must belong to, or be shared with, the manifest’s owner.
- timeout: Optional
Proxy.spec.timeout[int]: the most seconds to wait for the provider’s response.
- class smarter.models.sam.proxy.SAMProxy
Bases:
smarter.models.sam.base.SAMModelSmarter API Manifest - Proxy.
- metadata: SAMProxyMetadata
Proxy.metadata[obj]: Required, the Proxy metadata.
- spec: SAMProxySpec
Proxy.spec[obj]: Required, the Proxy specification.
- status: smarter.models.sam.proxy.SAMProxyStatus | None
Proxy.status[obj]: Optional, Read-only.
Stateful status information about the Proxy.