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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path to search in (relative to workspace)
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)