Desktop build: API bundle is missing `esperanto.providers.embedding.openai_compatible` ⇒ vector search and Ask always 500
Environment
- Open Notebook Desktop v1.1.1, macOS arm64, bundled API/worker/SurrealDB (
/Applications/Open Notebook.app/Contents/Resources/...). - API:
open_notebookserved on127.0.0.1:5055.
What happens
Vector search and Ask fail with HTTP 500 in the desktop build:
POST /api/search {"query": "...", "type": "vector"} → 500
{"detail": "Search failed: Provider 'openai-compatible' requires additional dependencies.
Missing package: esperanto.providers.embedding.openai_compatible."}
POST /api/search/ask → 500 (same message)
POST /api/search/ask/simple → 500 (same)
POST /api/search {"query": "...", "type": "text"} → 200 (works)
POST /api/chat/... (context with full content sources) → 200 (works)So it is specifically the embedding provider path in the API process, not the whole app: the worker side
embeds sources fine (all sources report embedded: true), and text search / chat work.
Why
The API-side frozen bundle ships only a subset of esperanto.providers.embedding.*:
$ grep -a -o 'esperanto\.providers\.[a-z_]*\.[a-z_]*' \
"/Applications/Open Notebook.app/Contents/Resources/api/open-notebook-api" | sort -u | grep embedding
esperanto.providers.embedding.azure
esperanto.providers.embedding.base
esperanto.providers.embedding.google
esperanto.providers.embedding.ollama
esperanto.providers.embedding.openai
esperanto.providers.embedding.vertex(the worker binary additionally contains ...embedding.openai_compatible, ...mistral, ...openrouter,
...transformers, ...voyage, ...jina — i.e. the worker's PyInstaller spec collects them and the API's does not)
With the embedding model registered as provider openai_compatible (the usual way to point Open Notebook at a
local OpenAI-compatible embedding server), the API tries to import
esperanto.providers.embedding.openai_compatible, which was not collected ⇒ 500 on every vector query.
Suggested fix
Make the API-side PyInstaller spec collect the embedding providers the same way the worker side does
(hiddenimports for esperanto.providers.embedding.*, or a collection rule for the whole
esperanto.providers.embedding package), and/or catch the missing-dependency error in the search endpoint and
return an actionable message instead of a 500 (e.g. "embedding provider not bundled in this build; use
type=text").
Workaround (for anyone hitting this today)
The API bundle does include the native esperanto.providers.embedding.openai, so an OpenAI-compatible
endpoint can be reached through that provider instead:
POST /api/credentialswithprovider: "openai",api_key: "<anything>",base_url: "http://127.0.0.1:8642/v1"(your embedding server) —modalities: ["embedding"].POST /api/modelswithprovider: "openai",type: "embedding",name: "<model name your server reports>",credential: <id from step 1>.PUT /api/models/defaultswith{"default_embedding_model": "<id from step 2>"}— note: PUT, a POST to that path returns 405.
After that, POST /api/search with type=vector returns 200 with chunk-level matches and similarity,
/api/search/ask works, and the worker keeps embedding new sources normally.
Source: lfnovo/open-notebook