SpecRouter

•

Dynamically converts OpenAPI/Swagger specifications into executable LLM tools using zero-ML, in-memory processing and triple-retrieval RRF routing.

SpecRouter is a high-performance, serverless engine that dynamically transforms extensive OpenAPI and Swagger specifications into executable LLM tools on demand. It innovatively replaces heavy embedding models and external vector databases with a lightning-fast, local CPU-bound search matrix to achieve sub-millisecond route discovery and completely eliminate context-window bloat. Its core philosophy revolves around "Two-Tool Lazy Loading," exposing just two generic contracts to LLMs: `discover_tools` for natural language to endpoint mapping, and `execute_tool` for authenticated HTTP transactions, providing a precise and efficient way for LLMs to interact with APIs.

主要功能

01Sub-millisecond route discovery via local CPU-bound search matrix
020 GitHub stars
03Eliminates LLM context-window bloat with "Two-Tool Lazy Loading" approach
04Dynamic conversion of OpenAPI/Swagger specifications into LLM tools
05Triple-retrieval RRF routing using BM25F, Token-Set Jaccard, and Levenshtein Distance
06Serverless and infrastructure-free Model Context Protocol (MCP) server

使用案例

01Integrating complex enterprise APIs into LLM applications without relying on embedding models
02Reducing the context window burden for LLMs requiring extensive API access
03Building LLM agents that can dynamically discover and interact with a vast array of APIs