Skip to content

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 12:12
c168876

What's Changed

Gateway Routing

  • Direct-first model resolution: Bare provider/model IDs (e.g. anthropic/claude-opus-4-5) now route to your direct provider key when configured, falling back to OpenRouter automatically when it isn't. Explicit openrouter/... prefixes remain force-OpenRouter overrides.
  • Gateway control surface: New --gateway auto|direct|openrouter CLI flag on start, fanout, and continue commands, plus matching gateway parameter on MCP tools. routing.prefer config key sets the global default ("direct" by default).
  • Structured routing errors: Non-interactive CLI and MCP now emit consistent model_route_error objects with type, field, requested, and reason fields instead of ad-hoc messages when routing fails.
  • Interactive fallback picker: When a direct route misses (missing key or model not in vendor's catalog), interactive runs now show a picker with alternatives instead of failing outright.

Model Catalog

  • Live Anthropic model fetcher: The model catalog now queries Anthropic's API directly for the current model list, bringing parity with OpenAI and Google's existing live-fetch behavior.

Configuration

  • Default aliases migration: Built-in aliases for direct-capable vendors (openai, google, anthropic, deepseek) now resolve to bare canonical model IDs instead of openrouter/... prefixes, so they participate in direct-first routing automatically. Gateway-only vendors (Qwen, Grok, GLM, Mistral) remain unchanged.
  • One-time migration notice: If you hold both an OpenRouter key and a direct key for a vendor, the first qualifying run prints a one-time notice showing which vendor moved to direct routing. Set routing.prefer: "openrouter" or use --gateway openrouter to restore the all-OpenRouter behavior without seeing the notice again.
  • Session provenance preservation: Resume and continue operations now preserve the gateway a run originally resolved to, even if keys or routing.prefer change between runs.

Infrastructure

  • Router foundation modules: New provider-registry.js, model-descriptor.js, model-classification.js, and gateway-router.js utilities provide unified provider metadata, descriptor grammar, tri-state model classification, and pure routing logic. All fully unit-tested with zero impact on existing launch paths.
  • Expanded test coverage: Added 14 new test files covering routing decision logic, model classification, error rendering, MCP integration, and end-to-end routing scenarios.

Full Changelog: v3.0.0...v3.1.0