agent-as-a-router  by LanceZPF

Agentic model routing for coding tasks

Created 3 weeks ago

New!

394 stars

Top 72.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary Agent-as-a-Router (ACRouter) provides official, reproducible implementations for agentic model routing tailored for coding tasks. It addresses the challenge of selecting the optimal backend AI model by balancing performance and cost, benefiting developers and researchers seeking efficient AI-driven coding solutions. A key advantage is its capability for offline reproduction of evaluation results, reducing dependency on live API calls and facilitating robust benchmarking.

How It Works ACRouter employs an agentic strategy to dynamically route coding tasks to various backend models, optimizing for performance and cost. The core methodology is evaluated using the CodeRouterBench dataset, with emphasis on the OOD176 benchmark for out-of-distribution task performance. This design enables offline reproduction of benchmark results, including performance-cost metrics, without live API keys, fostering reproducible research and development.

Quick Start & Requirements To begin, navigate to the repository directory (cd open-source-acrouter). A Conda environment is recommended, created with Python 3.11 (conda create -n acrouter python=3.11 -y) and activated (conda activate acrouter). Upgrade packaging tools (python -m pip install --upgrade pip setuptools wheel). Install dependencies via python -m pip install -r requirements.txt, then the package in editable mode (python -m pip install -e .). Offline reproduction is supported. For live demos, set API keys (e.g., OPENROUTER_API_KEY). Links to the homepage and paper are available.

Highlighted Details

  • Enables offline reproduction of benchmark results, including performance-cost tradeoffs, without live API calls or external model access.
  • Features runtime integrations for Claude Code Router and cc-switch, allowing ACRouter to be incorporated into existing workflows at the gateway or proxy level.
  • Includes the CodeRouterBench dataset (OOD176, OOD112, SWE-MiniSandbox) and Hugging Face assets for datasets and pre-trained router adapter models.
  • Provides demo routers for API coding solvers and commercial CLI tools, illustrating concrete integration scenarios.

Maintenance & Community The README does not specify community channels (e.g., Discord, Slack) or mention sponsorships. Key contributors are identified within the project's citation.

Licensing & Compatibility The specific license is not explicitly stated in the README. Consequently, its compatibility for commercial use or integration within closed-source projects remains undetermined.

Limitations & Caveats The README highlights OOD176 as the primary public benchmark, implying other benchmark datasets may exist. While offline reproduction is a strength, live performance may differ. The document does not detail unsupported platforms or known bugs.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
395 stars in the last 21 days

Explore Similar Projects

Feedback? Help us improve.