Feature: OrcaRouter provider support for LettuceDetect
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 28/100
Direzione di ricerca
The provider switch lives in make_llm_client(), which accepts openai or bedrock and passes a base_url to the OpenAI-compatible client. Read that function and the LLMDetector class to see how a provider value is chosen and how api_key and base_url reach the client. Before writing code, the issue needs a maintainer decision on whether a new provider is wanted, since no one has replied yet. If it is accepted, done means a new provider value that builds the client with the existing OpenAI-compatible shape, plus a test that checks the client configuration.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
LettuceDetect tackles a hard problem: instead of a clean-or-flagged verdict on an AI answer, it returns the exact character spans that are unsupported by or contradict the source evidence, across RAG prose, coding-agent answers, and tool output. Span-level precision backed by fast local encoders and generative detectors that type each span is why teams building grounded systems rely on it - and your v2 results on code-agent answers, where the fine-tuned Qwen-2B detector beats large LLM judges that over-flag generated code, make a concrete case for domain-tuned grounding checks.
Your LLM-based detector already routes through an OpenAI-compatible client with a provider switch (openai / bedrock) and a base_url override, so an OrcaRouter provider would let teams using method="llm" judges point the same detector at whichever model best fits their cost, language, or throughput needs - more choice, no change to the LettuceDetect API.
Problem or use case
LLM judges are limited today to the providers hard-coded in make_llm_client(). Teams that want to run grounding checks against a different frontier model, or need one API surface across budgets, must wire their own gateway. I'd like to propose OrcaRouter as an optional provider for this detector.
Proposed solution
Treat OrcaRouter like any other provider value in the LLMDetector abstraction. OrcaRouter exposes an OpenAI-compatible API and uses standard API-key authentication, so it fits the existing OpenAIClient shape (api_key plus base_url) - no new protocol or SDK. A user would construct an LLM-based detector with OrcaRouter as the backend and keep the rest of the LettuceDetect API unchanged.
The most relevant OrcaRouter capabilities for your users are: access to many chat and reasoning models through one endpoint, automatic model routing with provider failover, prompt caching for repeated context/answer pairs, and usage tracking with budgets for evaluation pipelines.
I'm an engineer on the OrcaRouter team and would be glad to draft the implementation PR if maintainers are open to it - nothing here is implemented or tested yet; this issue is only to gauge fit.
Alternatives considered
Teams can already point the OpenAI client at any OpenAI-compatible gateway via base_url. OrcaRouter adds a managed routing layer with failover, caching, and per-team usage controls, plus an optional partner program for open-source projects.
Disclosure
OrcaRouter runs an optional open-source partner program: approved OSS projects can receive a 5% revenue share from OrcaRouter usage attributed to their integration. Participation is not a prerequisite, and I am happy to follow whatever disclosure or governance policy the project prefers. Existing integrations are listed at https://www.orcarouter.ai/built-with; RAGFlow, Dify, and promptfoo list OrcaRouter as an optional provider.
Maintainers: would an OrcaRouter provider be a welcome addition? If so, I will follow up with a focused implementation PR.
- Lingua principale
- Python
- Stelle
- 615
- Fork
- 60
- Merge medio
- 1g 8h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KRLabsOrg/LettuceDetect
-
Stop-hook --min-confidence drops every --llm-model span (missing confidence treated as 0.0), reporting hallucinated answers as cleanForse già presa @Clannad47 l’ha presa 18 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
KRLabsOrg/LettuceDetect#117 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
KRLabsOrg/LettuceDetect#108 ·
I maintainer di solito rispondono entro 1 giorno
-
Add AGENTS.md: one entry file for coding agents and new contributorsForse già presa @ShryukGrandhi l’ha presa 18 giorni fa. Apertadocumentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
KRLabsOrg/LettuceDetect#104 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
KRLabsOrg/LettuceDetect#181 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
KRLabsOrg/LettuceDetect#180 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di KRLabsOrg/LettuceDetect
Issue simili
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Apertakind/bug priority/medium qa_automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37324 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
btclib-org/btclib-node#2260 ·
I maintainer di solito rispondono entro 1 giorno
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Forse già presa @geyazheng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
langchain-ai/langchain-aws#1469 ·
I maintainer di solito rispondono entro 1 giorno
-
GCToggler leaves collection enabled if the body re-enables itForse già presa @Gambit-Checkmate l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno