Show HN: I built an SDK to select the best model for your task (github.com)

🤖 AI Summary
AutoRouter is an npm SDK that auto-selects the best Hugging Face models for a given task by matching your task description to a bundled registry of several thousand models. You install autorouter-sdk, provide OpenAI and Pinecone credentials (OPENAI_API_KEY, PINECONE_API_KEY, optional PINECONE_INDEX_NAME defaults to 'autorouter-models'), run a one-time indexing step (npx autorouter-sdk index-models) that generates embeddings for each model and stores them in Pinecone, then call router.selectModel("build a chatbot") to get ranked recommendations. Results include metadata (id, name, task, provider, license, downloads, endpoint) and a 0–1 similarity score; you can filter by license, limit results, and customize the registry via scripts/generate-model-registry.ts (modelsPerTask, taskCategories, sortBy). This is significant because it automates model discovery and routing—useful for MLOps, multi-model inference, or quickly prototyping with the most appropriate open models—saving manual search and heuristic mapping. Key technical points: it uses OpenAI embeddings for semantic matching and Pinecone as the vector DB, so it’s fast but dependent on those services (costs and vendor lock-in). Indexing takes ~10–15 minutes and is rerunnable when you regenerate the registry. The SDK is MIT-licensed and exposes a simple API/CLI for integration into pipelines or apps.
Loading comments...
loading comments...