fix(embed): fall back to embeddings probe when models route is missing - #127
Merged
Grivn merged 1 commit intoSep 3, 2026
Merged
Conversation
OpenAI-compatible servers were probed for availability via GET <endpoint>/models and reported unavailable when that route did not exist. Some compatible providers serve embeddings but no models route at all — Voyage AI returns 404 there — leaving mnemon silently without semantic recall against a working endpoint. When the models route is missing (404/405/501), probe availability with a real embeddings round-trip instead, so availability reflects the endpoint the client actually depends on. Auth, quota, and server errors still report unavailable. The round-trip is shared with Embed via embedWithContext/decodeEmbedResponse so the probe and the real call cannot drift apart. Verified end-to-end against the Voyage AI API (voyage-3.5) and against a local Ollama instance.
Grivn
added a commit
that referenced
this pull request
Sep 3, 2026
Combine the OpenAI-compatible availability fallback from PR #127 with context-aware embedding cancellation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Available()for OpenAI-compatible servers now falls back to a real embeddings round-trip when theGET <endpoint>/modelsroute is missing (404/405/501).Why
Availability for OpenAI-compatible providers is currently decided solely by
GET /models. Some compatible providers serve embeddings but no models route at all — e.g. Voyage AI returns 404 there while/v1/embeddingsworks fine. Against such endpoints mnemon reportsembedding_available: falseand silently runs without semantic recall, even though the embedding endpoint itself is fully functional.The OpenAI compatibility surface mnemon actually depends on is
POST /embeddings, so availability should reflect that route when the conventional discovery route doesn't exist.Behavior after the change:
POST /embeddingsonce; available iff it returns a usable embeddingImplementation notes: the embeddings round-trip is shared with
Embed()viaembedWithContext/decodeEmbedResponse, so the probe and the real call cannot drift apart.Verified end-to-end against the Voyage AI production API (
voyage-3.5) and against a local Ollama instance.Checklist
make test)make test-integration, when affected)