DeepHorus is an innovative tech media and intelligence platform focused on AI, blockchain, startups, and emerging technologies.
Published on

Smart model routing directly in Claude, Codex and Cursor

Authors
  • avatar
    Name
    DeepHorus
    Twitter

Weave, an engineering intelligence platform trusted by companies like Robinhood and PostHog, has launched a new smart model routing proxy designed to optimize AI model selection for developers. The Weave Router provides a single endpoint—localhost:8080—that automatically routes requests to the most suitable model from providers including Anthropic, OpenAI, and Gemini, using a lightweight on-box embedder rather than prompt-based heuristics. This innovation aims to simplify the increasingly complex landscape of large language model (LLM) integration, allowing tools like Claude Code, OpenAI Codex CLI, and Cursor to seamlessly connect to the best model for each request.

The router addresses a growing challenge in AI development: choosing the right model for every task without manual tuning. Traditional approaches often rely on static model selection or vague prompt instructions, leading to suboptimal performance and wasted costs. Weave's solution uses a cluster scorer derived from Avengers-Pro 1, a tiny embedder that evaluates each request in real time to pick the optimal model from enabled providers. This per-request routing capability promises to maximize accuracy while minimizing latency and expense, as the system automatically adapts to the nuances of each query.

Key features include compatibility with Anthropic's Messages API, OpenAI's Chat Completions API, and Gemini's native interface, supporting streaming, tools, and vision. The router also integrates with open-source models via OpenRouter, covering DeepSeek, Kimi, GLM, Qwen, Llama, and Mistral through any OpenAI-compatible endpoint. Security is emphasized through a bring-your-own-key (BYOK) model, where provider API keys remain encrypted on the user's local machine. Additionally, the router provides built-in observability with OTLP traces viewable in Weave's dashboard or exported to tools like Honeycomb, Datadog, and Grafana.

Deployment is streamlined through simple commands. Developers can instantly wire the hosted version using npx @workweave/router, which automatically configures Claude Code, Codex, or opencode without cloning repositories or managing Docker containers. Self-hosted setups require only a PostgreSQL database and environment variables, with make full-setup booting the router and dashboard. The tool supports user-level and project-level scopes, and version pinning is available for production environments. Node.js 18 or later is required, with jq needed for Claude Code and opencode paths.

Industry observers note that this launch reflects the maturation of the AI infrastructure ecosystem, where efficiency and cost control are becoming critical differentiators. By abstracting away model selection, Weave's router could reduce development friction and encourage broader adoption of multi-provider AI workflows. However, some experts caution that relying on a single routing algorithm may introduce new failure modes, particularly for edge cases where the embedder's training data does not adequately represent certain tasks. Weave has published documentation for its scoring methodology, encouraging community feedback and iteration.

Looking ahead, Weave plans to extend the router's capabilities with additional provider integrations and advanced analytics features. The company envisions the router becoming a standard component in AI development pipelines, similar to how load balancers and API gateways are used in traditional web services. As organizations scale their use of LLMs, tools that optimize model selection automatically will likely become indispensable for managing both performance and cost. Weave's current user base, which includes fast-growing startups and established tech firms, suggests strong market demand for such intelligent routing solutions.

Read original article →Source: hn-frontpage