Pydantic Models

Smarter API Orchestrator Manifest Constants.

Smarter API Manifest - Orchestrator.metadata.

class smarter.apps.orchestrator.manifest.models.orchestrator.metadata.SAMOrchestratorMetadata(*, name: str, description: str | None, version: str | None, tags: List[str] | None = <factory>, annotations: List[dict[str, str | int | float | bool | ~datetime.date | ~datetime.datetime | ~decimal.Decimal | ~uuid.UUID | bytes | list | dict]] | None=<factory>)[source]

Bases: AbstractSAMMetadataBase

Smarter API Orchestrator Manifest - Metadata class.

class_identifier: ClassVar[str] = 'Orchestrator.metadata'
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

Pydantic manifest spec for the Orchestrator SAM (Smarter API Manifest) resource.

class smarter.apps.orchestrator.manifest.models.orchestrator.spec.SAMOrchestratorHarnessConfig(**data)[source]

Bases: BaseModel

A single LLMClient (Harness) membership within the Orchestrator.

Mirrors smarter.apps.orchestrator.models.OrchestratorHarness. The llmClientName is a reference by name, not by primary key — resolved against the account’s existing LLMClients at apply time.

config: dict[str, Any]
executionOrder: int
isActive: bool
llmClientName: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

role: HarnessRole
class smarter.apps.orchestrator.manifest.models.orchestrator.spec.SAMOrchestratorSpec(*, config: SAMOrchestratorSpecConfig)[source]

Bases: AbstractSAMSpecBase

Smarter API Orchestrator Manifest Orchestrator.spec.

class_identifier: ClassVar[str] = 'Orchestrator.spec'
config: SAMOrchestratorSpecConfig
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

class smarter.apps.orchestrator.manifest.models.orchestrator.spec.SAMOrchestratorSpecConfig(**data)[source]

Bases: BaseModel

Spec block for an Orchestrator SAM manifest.

Mirrors smarter.apps.orchestrator.models.Orchestrator. Consumed by the manifest controller to create/update the corresponding Orchestrator model instance and its OrchestratorHarness memberships.

harnesses: list[SAMOrchestratorHarnessConfig]
isActive: bool
maxIterations: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

strategy: OrchestrationStrategy
validate_strategy_role_requirements()[source]
Return type:

SAMOrchestratorSpecConfig

classmethod validate_unique_llm_clients(v)[source]
Return type:

list[SAMOrchestratorHarnessConfig]

Smarter API Manifest - Orchestrator.status.

class smarter.apps.orchestrator.manifest.models.orchestrator.status.SAMOrchestratorStatus(*, recordLocator: str, created: datetime, modified: datetime, accountNumber: str, username: str)[source]

Bases: AbstractSAMStatusBase

Smarter API Orchestrator Manifest - Status class.

accountNumber: str
class_identifier: ClassVar[str] = 'Orchestrator.status'
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

username: str

Smarter API Orchestrator Manifest.

class smarter.apps.orchestrator.manifest.models.orchestrator.model.SAMOrchestrator(*, apiVersion: str, kind: str, metadata: SAMOrchestratorMetadata, spec: SAMOrchestratorSpec, status: SAMOrchestratorStatus | None = None)[source]

Bases: AbstractSAMBase

Smarter API Manifest - Orchestrator.

class_identifier: ClassVar[str] = 'Orchestrator'
metadata: SAMOrchestratorMetadata
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

spec: SAMOrchestratorSpec
status: SAMOrchestratorStatus | None