HostCapabilities#

class openstef_foundation_models.inference.provider_selection.HostCapabilities(**data: Any) None[source]

Bases: BaseConfig

Execution-relevant facts about the host, captured as injectable data.

Passing host facts into a policy (rather than having the policy call platform.system() itself) keeps selection a pure function of its inputs, so it can be unit-tested by constructing a fake host.

Parameters:

data (Any)

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'frozen': True, 'protected_namespaces': ()}

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

platform: str
available_providers: frozenset[str]
classmethod detect() Self[source]

Detect the host’s capabilities from the platform and ONNX Runtime.

This is the one impure call in the selection path; it is isolated here so the policy stays a pure function of injected facts.

Return type:

Self

Returns:

The detected host capabilities.