Skip to content

feat: add multi-gateway smart routing - #1

Merged
andrei-hasna merged 1 commit into
mainfrom
feat/multi-gateway-smart-routing
Jul 24, 2026
Merged

feat: add multi-gateway smart routing#1
andrei-hasna merged 1 commit into
mainfrom
feat/multi-gateway-smart-routing

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

  • add generic OpenAI-compatible gateway support with baseUrlEnv, custom auth, and static/env-derived headers
  • add first-class presets/examples for OpenRouter Auto, Vercel AI Gateway, LiteLLM Proxy, Portkey, Cloudflare AI Gateway, Helicone AI Gateway, and Kong AI Gateway
  • add policy-first smart routing with cost/quality/latency/throughput scoring, deterministic fallback, capability/context filters, and explainable route scores
  • map OpenRouter and Vercel provider options narrowly while stripping gateway-only fields for direct providers
  • document why deterministic smart routing lives in open-gateway while open-router remains a future companion package

Verification

  • bun run typecheck
  • bun test
  • bun test tests/smoke.test.ts
  • bun run build
  • bun run src/cli/index.ts validate --config gateway.config.example.json
  • bun run src/cli/index.ts validate --config gateway.config.no-china.example.json
  • bun run src/cli/index.ts validate --config gateway.config.china.example.json

Notes

  • Reconciled adversarial review findings: unpriced models now fail price ceilings closed; OpenRouter ZDR/logging policy cannot be weakened by client provider options; required header envs are route eligibility checks.
  • npm publish was not attempted because the documented release gate requires live provider smoke, and this task requested mock-provider smoke verification.

@andrei-hasna
andrei-hasna force-pushed the feat/multi-gateway-smart-routing branch 2 times, most recently from 102b68d to 65da819 Compare July 24, 2026 14:04
@andrei-hasna
andrei-hasna force-pushed the feat/multi-gateway-smart-routing branch from 65da819 to 5ac480e Compare July 24, 2026 14:08
@andrei-hasna
andrei-hasna merged commit 5d9b6ec into main Jul 24, 2026
1 check passed
@andrei-hasna
andrei-hasna deleted the feat/multi-gateway-smart-routing branch July 24, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant