Skip to content

add rerank and tokenization endpoints#5

Merged
robmsmt merged 1 commit into
mainfrom
robmsmt/rerank-score-tokenize-endpoints
Mar 18, 2026
Merged

add rerank and tokenization endpoints#5
robmsmt merged 1 commit into
mainfrom
robmsmt/rerank-score-tokenize-endpoints

Conversation

@robmsmt
Copy link
Copy Markdown
Contributor

@robmsmt robmsmt commented Mar 18, 2026

No description provided.

@robmsmt robmsmt requested a review from Copilot March 18, 2026 08:37
@robmsmt robmsmt merged commit 4909c6d into main Mar 18, 2026
4 checks passed
@robmsmt robmsmt deleted the robmsmt/rerank-score-tokenize-endpoints branch March 18, 2026 08:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional LLM proxy endpoints to the FastAPI backend to support reranking, scoring, and (de)tokenization operations, wired into the app and covered by basic auth/route-registration tests.

Changes:

  • Introduces new /v1/rerank, /v1/score, /v1/tokenize, and /v1/detokenize routes (auth-protected) and registers them in the application.
  • Extends llm_service with new proxy helpers (llm_proxy_rerank/score/tokenize/detokenize) that forward requests to the upstream LLM service.
  • Updates backend tests to assert the new routes are present and reject unauthenticated requests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backend/tests/test_app.py Extends route-registration assertions and adds auth rejection tests for new endpoints.
backend/services/llm_service.py Adds proxy functions for rerank/score/tokenize/detokenize that delegate to the shared proxy handler with backoff.
backend/routers/tokenization.py New router implementing /v1/tokenize and /v1/detokenize endpoints.
backend/routers/rerank.py New router implementing /v1/rerank and /v1/score endpoints.
backend/main.py Registers the new routers so endpoints appear in OpenAPI and are served by the app.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants