Skip to content

feat: add smart endpoint router#588

Open
yassine1234944-design wants to merge 1 commit into
arakoodev:tsfrom
yassine1234944-design:yassine/smart-endpoint-router
Open

feat: add smart endpoint router#588
yassine1234944-design wants to merge 1 commit into
arakoodev:tsfrom
yassine1234944-design:yassine/smart-endpoint-router

Conversation

@yassine1234944-design

Copy link
Copy Markdown

Summary

  • Adds SmartEndpointRouter for OpenAI, PaLM/Gemini-style, and Cohere deployments.
  • Routes requests to the healthy deployment with the least token usage.
  • Supports token limits, cooldown after 429/5xx failures, retries across deployments, and observability callbacks.
  • Adds mocked tests for routing, cooldown retry behavior, and callback emission.

/claim #286

Validation

  • npx.cmd -y prettier@3.2.5 --check src/ai/src/lib/smart-router/smartRouter.ts src/ai/src/tests/smartRouter.test.ts src/ai/src/index.ts
  • npx.cmd -y vitest@2.0.3 run src/ai/src/tests/smartRouter.test.ts
  • npx.cmd -y esbuild@0.20.2 src/ai/src/index.ts --bundle --external:* --platform=node --format=esm --outfile=$env:TEMP\edgechains-ai-router.mjs --log-level=error
  • npx.cmd -p typescript@5.6.3 tsc -p tsconfig.json --emitDeclarationOnly --outDir

@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@yassine1234944-design

Copy link
Copy Markdown
Author

I have read the Arakoo CLA Document and I hereby sign the CLA

@yassine1234944-design

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant