Skip to content

fix(server): honour [embedding]/[vector] config and UTEKE_EMBEDDING_BACKEND (#1399) - #1401

Merged
ajianaz merged 1 commit into
developfrom
fix/server-embedding-config-1399
Oct 9, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/server-embedding-config-1399

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

What

uteke-serve now reads [embedding] (backend, model, api_key, base_url, endpoint_path, dims) and [vector] (backend) from uteke.toml and UTEKE_EMBEDDING_BACKEND from the environment, and opens the store with open_with_embedding_and_graph like the CLI does. Backend precedence: non-empty env > [embedding] backend > onnx. An unsupported backend exits at startup with a message naming the supported ones and where to set it. UTEKE_EMBEDDING_{BASE_URL,MODEL,DIMS,API_KEY,ENDPOINT_PATH} keep winning over the file inside the core, as before. Existing deployments without these settings behave exactly as before (onnx, default tier/recall/graph configs).

Why

Closes #1399. uteke-serve called Uteke::open(), which hardcodes the onnx backend and default embedding settings, and ServerFileConfig had no [embedding] section, so an external embedder could not be used even though docs/configuration.md lists UTEKE_EMBEDDING_BACKEND. The project-local uteke.toml stays untrusted for embedding.* keys through the shared layered resolver (covered by a test).

Testing

  • fmt, clippy -D warnings, cargo test --workspace green; 5 new unit tests (default onnx, toml selects openai with its settings and [vector], env beats toml and an empty env is ignored, unsupported backend error text, untrusted project file cannot pick the embedder)
  • End-to-end, run locally: built uteke-serve, started it with UTEKE_EMBEDDING_BACKEND=openai + UTEKE_EMBEDDING_BASE_URL pointing at a fake OpenAI-compatible server (768 dims). POST /remember and POST /recall returned success and the fake server logged 2 requests to /v1/embeddings with model and dimensions: 768 (the configured values). Not run: a real embedder, Docker, or the labs deployment
  • Not covered: [embed_fallback], tier/recall/graph/jaccard settings are still not read by the server (they use the core defaults as before); that remains part of refactor: unify the mirrored config schema structs (CLI Config vs server ServerFileConfig) #1355

🤖 Generated with Claude Code

…ACKEND (#1399)

uteke-serve opened the store with Uteke::open(), which hardcodes the onnx
backend, so an external OpenAI-compatible or Ollama embedder could never be
used. The server now resolves the embedder (env backend > [embedding] backend
> onnx) and the [vector] engine and opens the store with
open_with_embedding_and_graph, as the CLI does. An unsupported backend exits
with an actionable error. The project-local file stays untrusted for
embedding.* keys via the shared layered resolver.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 3446ec1 into develop Oct 9, 2026
15 checks passed
@ajianaz
ajianaz deleted the fix/server-embedding-config-1399 branch October 9, 2026 04:36
ajianaz added a commit that referenced this pull request Oct 9, 2026
* fix(docker): skip the ONNX download for non-onnx backends and fail clearly on unwritable /data (#1398) (#1400)

The entrypoint now resolves the embedding backend (UTEKE_EMBEDDING_BACKEND,
then [embedding] backend in $UTEKE_HOME/uteke.toml, then onnx) and only
downloads the local model for onnx. If a download is needed but the data dir
is not writable it exits with an actionable message. Data dir follows
UTEKE_HOME (default /data). Covered by integration tests that run the script
with a fake curl and a fake uteke-serve.

Co-authored-by: ajianaz <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* fix(server): honour [embedding]/[vector] config and UTEKE_EMBEDDING_BACKEND (#1399) (#1401)

uteke-serve opened the store with Uteke::open(), which hardcodes the onnx
backend, so an external OpenAI-compatible or Ollama embedder could never be
used. The server now resolves the embedder (env backend > [embedding] backend
> onnx) and the [vector] engine and opens the store with
open_with_embedding_and_graph, as the CLI does. An unsupported backend exits
with an actionable error. The project-local file stays untrusted for
embedding.* keys via the shared layered resolver.

Co-authored-by: ajianaz <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>

* chore(release): v0.20.1 - version bump, changelog, docs sync

Patch release with the two embedder fixes (#1398, #1399) cherry-picked from
develop; version files, skill version lines, core-contract.json and the
CHANGELOG entry updated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: ajianaz <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(server): uteke-serve ignores [embedding]/[vector] config and UTEKE_EMBEDDING_BACKEND

1 participant