v1
latestOpenAPI 3.0.32026-07-22194221292.5 KBCode reranking/semantic search
Uses Relace's code reranking model to find the most relevant files for a given query. This is useful as a first pass in agentic exploration to narrow down the search space.
Based on: https://docs.relace.ai/docs/code-reranker/agent
Query Construction: The query can be a short question or a more detailed conversation with the user request included. For a first pass, use the full conversation; for subsequent calls, use more targeted questions.
Token Limit and Score Threshold: For 200k token context models like Claude 4 Sonnet, recommended defaults are scoreThreshold=0.5 and tokenLimit=30000.
The response will be a list of file paths and contents ordered from most relevant to least relevant.
Path parameters
Path to search in (relative to workspace)
Query parameters
Natural language query to search for
Minimum relevance score (default: 0.5)
Maximum tokens to return (default: 30000)
Regex pattern to filter files (e.g., .*\.ts$ for TypeScript files)
Response
Relevant files found
Example response
{
"message": "Found 5 relevant files",
"success": true
}