Skip to main content

Module engine_config

Module engine_config 

Source
Expand description

TOML-based embedding engine configuration for khive.

Loads ./.khive/config.toml (or a path from --config / KHIVE_CONFIG) and exposes an [[engines]] array that drives arbitrary-N embedding engine registration per ADR-031 §D3.

§Config file format

[[engines]]
name = "default"
model = "all-minilm-l6-v2"
default = true
fusion_weight = 0.5

[[engines]]
name = "paraphrase"
model = "paraphrase-multilingual-minilm-l12-v2"
fusion_weight = 0.5

§Resolution order

  1. Config file (from --config / KHIVE_CONFIG / ./.khive/config.toml)
  2. Env-var fallback (KHIVE_EMBEDDING_MODEL + KHIVE_ADDITIONAL_EMBEDDING_MODELS) when no config file is present

If both file and env vars are present, the file wins and a warning is emitted.

Structs§

ActorConfig
Actor configuration — the default namespace / identity for this khive instance.
EngineConfig
Configuration for a single embedding engine.
KhiveConfig
Top-level khive configuration loaded from khive.toml or config.toml.

Enums§

ConfigError
Errors produced while loading or validating a KhiveConfig.

Functions§

config_from_env
Build an in-memory KhiveConfig from the legacy env-var path.