Provider Model Examples
- Cohere:
cohere/rerank-v3.5 - vLLM:
vllm/BAAI/bge-reranker-v2-m3 - Bedrock:
bedrock/<rerank-model-or-arn> - Vertex AI:
vertex/<ranking-model>
Basic Request
Request Parameters
model(required): model inprovider/modelformatquery(required): query used for rankingdocuments(required): array of documents withtext(optionalid,meta)top_n(optional): maximum number of resultsmax_tokens_per_doc(optional): provider-dependent document token cappriority(optional): provider-dependent priority hintreturn_documents(optional): include matched document content in each resultfallbacks(optional): fallback models inprovider/modelformat
Example with Options
vLLM Endpoint Compatibility
When using avllm/... model, Bifrost sends rerank requests to /v1/rerank first and automatically retries /rerank when the upstream endpoint responds with 404, 405, or 501.
Response Shape
Common Validation Errors
- Missing
query->query is required for rerank - Empty
documents->documents are required for rerank - Blank document text ->
document text is required for rerank at index N top_n < 1->top_n must be at least 1
Next Steps
Now that you understand reranking, explore these related topics:Essential Topics
- Multimodal AI - Process images, audio, and multimedia content
- Tool Calling - Enable AI models to use external tools and functions
- Provider Configuration - Multiple providers for redundancy
- Integrations - Drop-in compatibility with existing SDKs
Advanced Topics
- Core Features - Advanced Bifrost capabilities
- Architecture - How Bifrost works internally
- Deployment - Production setup and scaling

