Skip to content

Vector Stores

Which storage backend an embedding-capable package should use. A third instance of the same two-tier pattern as Resources (connection/database) and LLM (provider/model): here there is only one tier, since a vector store just names the GenericDatabaseConfig its tables live in plus a backend key, rather than introducing its own leaf-tier section.

VectorStoreConfig

Stored in [vector_stores.<name>]. backend_type is a plain string (e.g. "sqlitevec", "pgvector") validated by the owning package, not by oa-configurator — the same discipline ProviderConfig.provider uses. database must reference a GenericDatabaseConfig entry, never a CDMDatabaseConfig one: a vector store's tables have no CDM vocab/results roles, so a [databases.*] entry with kind = "generic" is required.

Bases: BaseModel

Which storage backend an embedding-capable package should use.

Peer of :class:~oa_configurator.domains.resources.schema.DatabaseConfig and :class:~oa_configurator.domains.llm.schema.ModelConfig: the unit that consuming packages reference by name (e.g. a package's vector_store_name field just names an entry here). Each entry under [vector_stores] in config.toml maps to one instance of this model.

backend_type is deliberately a plain string, not an enum imported from the owning package (e.g. omop-emb's BackendType); oa-configurator never needs to know which backend keys are valid, the same way :attr:~oa_configurator.domains.llm.schema.ProviderConfig.provider never needs to know which LLM providers any-llm supports. Validation of the value happens in the owning package's own resolution code.

resolve

resolve(
    name: str, stack: StackConfig
) -> ResolvedVectorStore

Resolve this vector store to a concrete, backend-ready configuration.

stack must already have passed :meth:StackConfig.validate_references, so self.database is guaranteed to exist in stack.databases (as a GenericDatabaseConfig).

Resolved type

VectorStoreConfig.resolve() produces this. Resolver.resolve_vector_store() is a thin wrapper around the same method.

Concrete, backend-agnostic vector-store configuration.

No explicit methods; a plain data struct the consuming package uses to construct its own backend-specific handle.

Attributes:

Name Type Description
name str

Logical name of the vector store as declared in the config.

backend_type str

Storage backend key, e.g. 'sqlitevec', 'pgvector'.

database ResolvedDatabase

Resolved database backing this store.

faiss_cache_dir (str, optional)

Directory to cache FAISS index files, if configured.

configuration dict[str, Any]

Free-form per-store knobs with no dedicated field.