mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-27 22:15:33 +00:00
LiteLLM normalizes Cohere/Voyage/Jina rerank backends to the wire shape gateway.rerank() already speaks, so a reranker touchpoint on the litellm recipe makes any proxied rerank model reachable via `search.reranker.model litellm:<model>` with no adapter. Repairs from the original PR: - path is the LEAF '/rerank' (not '/v1/rerank'): LiteLLM serves both /rerank and /v1/rerank, and the recipe's setup_hint allows LITELLM_BASE_URL with or without the /v1 suffix — pinning '/v1/rerank' doubled to /v1/v1/rerank (404) on /v1-suffixed bases. - setup_hint appends the rerank guidance to master's current line instead of replacing it with a stale pre-/v1-suffix version. - cost_per_1m_tokens_usd stays undefined (pricing-unknown), matching the recipe's embedding/chat touchpoints and budget-tracker's deliberate litellm exclusion from the free-provider sets (a proxy can front a paid provider; the touchpoint field isn't consumed by rerank pricing anyway). Test drives gateway.rerank()'s real URL builder via the stubbed transport for both base-URL forms; the /v1-suffixed case fails with the original PR's path. Co-authored-by: ozp <ozp@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>