feat: switchable router embedder and L3 backends via config

Adds [router.embedder] and [router.l3] sections to CorrexConfig with
backend selectors. Ships LlamaCppEmbedder that hits llama.cpp's
/embedding endpoint (handles OpenAI-compatible, simple, and array
response shapes; validates dimension). InfrastructureModule gains
createEmbedderFromConfig and createL3MemoryStoreFromConfig that
dispatch on backend value.

Defaults preserve current behavior (noop embedder + in-memory L3).
Switching to "llamacpp" / "turbovec" is a config-only change — no code
edits required. For turbovec backend, the bundled python sidecar
script is extracted from classpath to ~/.cache/correx/ on first use.
This commit is contained in:
2026-05-30 01:23:14 +04:00
parent 84a7568e15
commit d68c76ee3c
11 changed files with 496 additions and 2 deletions
+2
View File
@@ -11,10 +11,12 @@ dependencies {
implementation project(":core:inference")
implementation project(":core:approvals")
implementation project(":core:sessions")
implementation project(":core:config")
implementation project(":infrastructure:inference")
implementation project(":infrastructure:inference:commons")
implementation project(":infrastructure:inference:llama_cpp")
implementation project(":infrastructure:persistence")
implementation project(":infrastructure:router:turbovec")
implementation project(":infrastructure:tools")
implementation project(":infrastructure:tools:filesystem")
implementation project(":infrastructure:workflow")