Repository navigation
feat: Pass through /v1/embeddings and serve GET /v1/models/{model}. - #430
Merged
franciscojavierarceo merged 3 commits intoOct 10, 2026
Conversation
Signed-off-by: Mohammad <[email protected]>
Mohammad-nassar10
requested review from
bbrowning,
franciscojavierarceo,
haoshan98,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
October 10, 2026 00:09
There was a problem hiding this comment.
🟡 Changes recommended
Model retrieval drops upstream metadata headers and its OpenAPI success response lacks a body schema.
2 open findings
What changed in this PR
Adds embeddings passthrough and single-model retrieval to the HTTP gateway.
Changes:
- Proxies
POST /v1/embeddings. - Serves
GET /v1/models/{model}from the upstream model list. - Adds documentation, OpenAPI registration, authentication checks, and integration tests.
| File | Description |
|---|---|
README.md |
Lists the new endpoints. |
docs/api/index.md |
Documents passthrough and model retrieval behavior. |
crates/agentic-server/tests/oidc_auth_test.rs |
Verifies endpoint authentication. |
crates/agentic-server/tests/models_test.rs |
Tests model lookup and errors. |
crates/agentic-server/tests/embeddings_passthrough_test.rs |
Tests embeddings passthrough and limits. |
crates/agentic-server/src/openapi.rs |
Registers the new OpenAPI paths. |
crates/agentic-server/src/handler/mod.rs |
Re-exports new handlers. |
crates/agentic-server/src/handler/http/models.rs |
Implements model retrieval. |
crates/agentic-server/src/handler/http/mod.rs |
Registers HTTP handler modules. |
crates/agentic-server/src/handler/http/embeddings.rs |
Implements embeddings passthrough. |
crates/agentic-server/src/handler/http/chat_completions.rs |
Reuses the shared passthrough helper. |
crates/agentic-server/src/handler/common.rs |
Centralizes passthrough behavior. |
crates/agentic-server/src/app.rs |
Adds routes to the protected router. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Mohammad <[email protected]>
franciscojavierarceo
approved these changes
Oct 10, 2026
This was referenced Oct 10, 2026
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.


Summary
First part of #404, the audio routes follow in a separate PR.
POST /v1/embeddingsis forwarded to the upstream unchanged, through the same pass-through helper as Chat Completions (moved tohandler/common.rsso the routes share it).GET /v1/models/{model}returns the matching entry from the upstream/v1/modelslist. vLLM has no per-model route, so a plain forward would always return 404 (happy to switch if you prefer). Unlisted models get 404model_not_found, upstream errors are returned unchanged, and IDs containing/work encoded or not./v1/*routes. README and API docs updated.Test Plan
embeddings_passthrough_test.rs; retrieval tests added tomodels_test.rs; unit tests for the model lookup.cargo fmt -- --check,cargo clippy --all-targets -- -D warningsandcargo test -p agentic-serverpass.Refs #404.