Skip to main content

venice_ai.core.config.backends

Backend configuration models for Venice AI.

Enterprise feature: Configures the storage backends used by state management, account tracking, and the adaptive scheduler.

RedisBackendConfig Objects

class RedisBackendConfig(BaseModel)

Configuration for Redis backend operations.

Enterprise feature: Required when BackendConfig.backend_type is REDIS. redis_url has no default to prevent accidental localhost connections in production.

RedisBackendConfig.validate_default_ttl

@field_validator("default_ttl")
@classmethod
def validate_default_ttl(cls, v: int) -> int

Validate default TTL with recommended maximum of 7 days.

RedisBackendConfig.validate_connection_timeout

@field_validator("connection_timeout")
@classmethod
def validate_connection_timeout(cls, v: float) -> float

Validate connection timeout with reasonable bounds.

RedisBackendConfig.validate_max_connections

@field_validator("max_connections")
@classmethod
def validate_max_connections(cls, v: int) -> int

Validate max connections with reasonable upper bound.

MemoryBackendConfig Objects

class MemoryBackendConfig(BaseModel)

Configuration for memory backend cleanup operations.

BackendConfig Objects

class BackendConfig(BaseModel)

Configuration for data persistence backends.

Enterprise feature: Configures the storage backend used by state management, account tracking, and the adaptive scheduler.

By default uses BackendType.MEMORY — no external dependencies needed. Set backend_type=BackendType.REDIS for distributed/multi-process deployments and provide a RedisBackendConfig with a valid redis_url.