Skip to content

Providers and models

octomate.config.providers

Credentials and default settings for each model provider.

OpenAIProviderConfig pydantic-model

Bases: BaseModel

OpenAI credentials, endpoint and default model settings.

Config:

  • arbitrary_types_allowed: True

Fields:

Source code in octomate/config/providers.py
class OpenAIProviderConfig(BaseModel):
    """OpenAI credentials, endpoint and default model settings."""

    model_config = ConfigDict(arbitrary_types_allowed=True)

    api_key: SecretStr | None = None
    base_url: str | None = None
    settings: OpenAIModelSettings = OpenAIModelSettings(
        openai_prompt_cache_retention="24h",
    )

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

api_key pydantic-field

api_key: SecretStr | None = None

base_url pydantic-field

base_url: str | None = None

settings pydantic-field

settings: OpenAIModelSettings

DeepSeekProviderConfig pydantic-model

Bases: BaseModel

DeepSeek credentials.

Fields:

Source code in octomate/config/providers.py
class DeepSeekProviderConfig(BaseModel):
    """DeepSeek credentials."""

    api_key: SecretStr | None = None

api_key pydantic-field

api_key: SecretStr | None = None

GeminiProviderConfig pydantic-model

Bases: BaseModel

Gemini via the Google Developer API (AI Studio).

Fields:

Source code in octomate/config/providers.py
class GeminiProviderConfig(BaseModel):
    """Gemini via the Google Developer API (AI Studio)."""

    api_key: SecretStr | None = None

api_key pydantic-field

api_key: SecretStr | None = None

VertexProviderConfig pydantic-model

Bases: BaseModel

Gemini via Vertex AI. location defaults to "global" (matching the prior GoogleProvider(location="global")); credentials_file is a service-account JSON path, and when omitted Application Default Credentials are used.

Fields:

Source code in octomate/config/providers.py
class VertexProviderConfig(BaseModel):
    """Gemini via Vertex AI. `location` defaults to "global" (matching the prior
    GoogleProvider(location="global")); `credentials_file` is a service-account
    JSON path, and when omitted Application Default Credentials are used."""

    project: str | None = None
    location: str | None = "global"
    credentials_file: str | None = None

project pydantic-field

project: str | None = None

location pydantic-field

location: str | None = 'global'

credentials_file pydantic-field

credentials_file: str | None = None

AnthropicProviderConfig pydantic-model

Bases: BaseModel

Anthropic credentials, endpoint and default model settings.

Config:

  • arbitrary_types_allowed: True

Fields:

Source code in octomate/config/providers.py
class AnthropicProviderConfig(BaseModel):
    """Anthropic credentials, endpoint and default model settings."""

    model_config = ConfigDict(arbitrary_types_allowed=True)

    api_key: SecretStr | None = None
    base_url: str | None = None
    settings: AnthropicModelSettings = AnthropicModelSettings(
        anthropic_cache_tool_definitions=True,
        anthropic_cache_instructions=True,
        anthropic_cache=True,
    )

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

api_key pydantic-field

api_key: SecretStr | None = None

base_url pydantic-field

base_url: str | None = None

settings pydantic-field

settings: AnthropicModelSettings

BedrockProviderConfig pydantic-model

Bases: BaseModel

AWS Bedrock credentials, region and default model settings.

Config:

  • arbitrary_types_allowed: True

Fields:

Source code in octomate/config/providers.py
class BedrockProviderConfig(BaseModel):
    """AWS Bedrock credentials, region and default model settings."""

    model_config = ConfigDict(arbitrary_types_allowed=True)

    region_name: str | None = None
    aws_access_key_id: SecretStr | None = None
    aws_secret_access_key: SecretStr | None = None
    aws_session_token: SecretStr | None = None
    profile_name: str | None = None
    api_key: SecretStr | None = None
    settings: BedrockModelSettings = BedrockModelSettings(
        bedrock_cache_tool_definitions=True,
        bedrock_cache_instructions=True,
        bedrock_cache_messages=True,
    )

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

region_name pydantic-field

region_name: str | None = None

aws_access_key_id pydantic-field

aws_access_key_id: SecretStr | None = None

aws_secret_access_key pydantic-field

aws_secret_access_key: SecretStr | None = None

aws_session_token pydantic-field

aws_session_token: SecretStr | None = None

profile_name pydantic-field

profile_name: str | None = None

api_key pydantic-field

api_key: SecretStr | None = None

settings pydantic-field

settings: BedrockModelSettings

ProvidersConfig pydantic-model

Bases: BaseModel

Every provider's credentials, each absent unless configured.

Config:

  • extra: ignore

Fields:

Source code in octomate/config/providers.py
class ProvidersConfig(BaseModel):
    """Every provider's credentials, each absent unless configured."""

    model_config = ConfigDict(extra="ignore")

    openai: OpenAIProviderConfig | None = None
    deepseek: DeepSeekProviderConfig | None = None
    gemini: GeminiProviderConfig | None = None
    vertex: VertexProviderConfig | None = None
    anthropic: AnthropicProviderConfig | None = None
    bedrock: BedrockProviderConfig | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(extra='ignore')

openai pydantic-field

openai: OpenAIProviderConfig | None = None

deepseek pydantic-field

deepseek: DeepSeekProviderConfig | None = None

gemini pydantic-field

gemini: GeminiProviderConfig | None = None

vertex pydantic-field

vertex: VertexProviderConfig | None = None

anthropic pydantic-field

anthropic: AnthropicProviderConfig | None = None

bedrock pydantic-field

bedrock: BedrockProviderConfig | None = None

octomate.config.models

Model selections and the per-provider default settings a model is built with.

supported_providers module-attribute

supported_providers: set[str] = {
    "openai",
    "openai-chat",
    "deepseek",
    "google",
    "google-cloud",
    "anthropic",
    "bedrock",
}

CacheTTL module-attribute

CacheTTL = bool | Literal['5m', '1h']

OpenAIModelSettings

Bases: ModelSettings

Default OpenAI settings applied to every model this provider builds. Subclasses pydantic-ai's ModelSettings so it merges with no conversion; only declared ModelSettings keys are accepted (unknown keys are dropped).

Source code in octomate/config/models.py
class OpenAIModelSettings(ModelSettings, total=False):
    """Default OpenAI settings applied to every model this provider builds.
    Subclasses pydantic-ai's ModelSettings so it merges with no conversion; only
    declared ModelSettings keys are accepted (unknown keys are dropped)."""

    openai_prompt_cache_retention: Literal["in_memory", "24h"]

openai_prompt_cache_retention instance-attribute

openai_prompt_cache_retention: Literal['in_memory', '24h']

AnthropicModelSettings

Bases: ModelSettings

Default Anthropic settings applied to every model this provider builds.

Source code in octomate/config/models.py
class AnthropicModelSettings(ModelSettings, total=False):
    """Default Anthropic settings applied to every model this provider builds."""

    anthropic_cache_tool_definitions: CacheTTL
    anthropic_cache_instructions: CacheTTL
    anthropic_cache: CacheTTL

anthropic_cache_tool_definitions instance-attribute

anthropic_cache_tool_definitions: CacheTTL

anthropic_cache_instructions instance-attribute

anthropic_cache_instructions: CacheTTL

anthropic_cache instance-attribute

anthropic_cache: CacheTTL

BedrockThinkingConfig

Bases: TypedDict

Bedrock's thinking request field.

Source code in octomate/config/models.py
class BedrockThinkingConfig(TypedDict, total=False):
    """Bedrock's `thinking` request field."""

    type: Literal["adaptive", "enabled", "disabled"]
    # Opus 4.7+ defaults to "omitted": thinking blocks stream with empty text
    # (signature only). "summarized" restores visible thinking deltas.
    display: Literal["summarized", "omitted"]

type instance-attribute

type: Literal['adaptive', 'enabled', 'disabled']

display instance-attribute

display: Literal['summarized', 'omitted']

BedrockOutputConfig

Bases: TypedDict

Bedrock's output_config request field.

Source code in octomate/config/models.py
class BedrockOutputConfig(TypedDict, total=False):
    """Bedrock's `output_config` request field."""

    effort: Literal["low", "medium", "high"]

effort instance-attribute

effort: Literal['low', 'medium', 'high']

BedrockAdditionalModelRequestFields

Bases: TypedDict

Raw fields passed through to the Bedrock Converse API. Used for reasoning config on models whose thinking shape isn't covered by the unified thinking setting (e.g. claude-opus-4-x, which needs type: adaptive).

Source code in octomate/config/models.py
class BedrockAdditionalModelRequestFields(TypedDict, total=False):
    """Raw fields passed through to the Bedrock Converse API. Used for reasoning
    config on models whose thinking shape isn't covered by the unified
    `thinking` setting (e.g. claude-opus-4-x, which needs `type: adaptive`)."""

    thinking: BedrockThinkingConfig
    output_config: BedrockOutputConfig

thinking instance-attribute

thinking: BedrockThinkingConfig

output_config instance-attribute

output_config: BedrockOutputConfig

BedrockModelSettings

Bases: ModelSettings

Default Bedrock settings applied to every model this provider builds.

Source code in octomate/config/models.py
class BedrockModelSettings(ModelSettings, total=False):
    """Default Bedrock settings applied to every model this provider builds."""

    bedrock_cache_tool_definitions: CacheTTL
    bedrock_cache_instructions: CacheTTL
    bedrock_cache_messages: CacheTTL
    bedrock_additional_model_requests_fields: BedrockAdditionalModelRequestFields

bedrock_cache_tool_definitions instance-attribute

bedrock_cache_tool_definitions: CacheTTL

bedrock_cache_instructions instance-attribute

bedrock_cache_instructions: CacheTTL

bedrock_cache_messages instance-attribute

bedrock_cache_messages: CacheTTL

bedrock_additional_model_requests_fields instance-attribute

bedrock_additional_model_requests_fields: (
    BedrockAdditionalModelRequestFields
)

ModelConfig pydantic-model

Bases: BaseModel

A model selection: which provider builds it and the model name. Reusable across agents. settings is an optional per-model override (a pydantic-ai ModelSettings) layered under the agent and run settings; arbitrary_types is needed because ModelSettings embeds non-pydantic types (e.g. httpx.Timeout).

Config:

  • arbitrary_types_allowed: True

Fields:

Validators:

Source code in octomate/config/models.py
class ModelConfig(BaseModel):
    """A model selection: which provider builds it and the model name. Reusable
    across agents. `settings` is an optional per-model override (a pydantic-ai
    ModelSettings) layered under the agent and run settings; arbitrary_types is
    needed because ModelSettings embeds non-pydantic types (e.g. httpx.Timeout)."""

    model_config = ConfigDict(arbitrary_types_allowed=True)

    name: KnownModelName
    settings: ModelSettings | None = None

    @cached_property
    def provider(self) -> str | None:
        provider, _ = parse_model_id(self.name)
        return provider

    @model_validator(mode="after")
    def validate_supported_provider(self) -> Self:
        if self.provider is not None and self.provider not in supported_providers:
            raise ValueError(f"unsupported model provider prefix in {self.name!r}")
        return self

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

name pydantic-field

name: KnownModelName

settings pydantic-field

settings: ModelSettings | None = None

provider cached property

provider: str | None

validate_supported_provider pydantic-validator

validate_supported_provider() -> Self
Source code in octomate/config/models.py
@model_validator(mode="after")
def validate_supported_provider(self) -> Self:
    if self.provider is not None and self.provider not in supported_providers:
        raise ValueError(f"unsupported model provider prefix in {self.name!r}")
    return self