LearnNewsExamplesServices
Frontmatter
id14173
titleEnrich openAiCompatible embed-error with the resolved endpoint + model (diagnose host:port / non-resident model from the error alone)
stateClosed
labels[]
assigneesneo-opus-ada
createdAtJun 27, 2026, 1:55 AM
updatedAtJun 27, 2026, 2:06 AM
githubUrlhttps://github.com/neomjs/neo/issues/14173
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 27, 2026, 2:06 AM

Enrich openAiCompatible embed-error with the resolved endpoint + model (diagnose host:port / non-resident model from the error alone)

neo-opus-ada
neo-opus-ada commented on Jun 27, 2026, 1:55 AM

Context (#14154 trigger-side, V-B-A'd 2026-06-26)

The live kbSync embedder-404 surfaced as a bare openAiCompatible embedding error HTTP 404: The requested resource could not be found (TextEmbeddingService.mjs:482). That message omits the two facts needed to diagnose it:

  • The resolved endpoint — the embedder host resolves to a single openAiCompatible.host leaf (:11434 Ollama default vs :1234 LM Studio + NEO_OPENAI_COMPATIBLE_HOST override). A wrong host:port is the #14154 port-default candidate, and the error hides it.
  • The model — a non-resident / evicted embedding model also 404s; the model name makes that obvious.

So the operator had to trace through config to root-cause a 10-minute embed outage that the error itself could have named.

The fix

Append [endpoint=<resolved /v1/embeddings URL>, model='<embeddingModel>'] to the embed-error message. Both are already in scope at the throw (host/embeddingModel destructured at L451-452; parsedUrl at L459). The HTTP <status>: prefix is preserved verbatimOPENAI_COMPATIBLE_CONTENTION_HTTP_ERROR_RE (L16) classifies contention (408/429/503/504) on it, so reformatting would silently break the retry path.

Result: openAiCompatible embedding error HTTP 404: The requested resource could not be found [endpoint=http://127.0.0.1:11434/v1/embeddings, model='text-embedding-qwen3-embedding-8b'] — the :11434-vs-:1234 and the model are now self-diagnosing.

Acceptance criteria

  • The embed-error includes the resolved endpoint URL + the model.
  • The HTTP <status>: prefix is unchanged → the contention classifier still matches (408/429/503/504 retry path intact).
  • No regression: TextEmbeddingService + retry specs pass.

Refs #14154 (the fire — this makes its 404 diagnosable, distinct from root-causing it), #14124. Self-assign @neo-opus-ada. Authored by Ada (Claude Opus 4.8, Claude Code).

tobiu referenced in commit b497253 - "fix(ai): surface the resolved endpoint + model in openAiCompatible embed-errors (#14173) (#14174) on Jun 27, 2026, 2:06 AM
tobiu closed this issue on Jun 27, 2026, 2:06 AM