Skip to content

feat(js-sdk): implement SmartRouter with 429 failover and load balancing (#286)#455

Open
shehzada9933 wants to merge 1 commit intoarakoodev:tsfrom
shehzada9933:ts
Open

feat(js-sdk): implement SmartRouter with 429 failover and load balancing (#286)#455
shehzada9933 wants to merge 1 commit intoarakoodev:tsfrom
shehzada9933:ts

Conversation

@shehzada9933
Copy link
Copy Markdown

/claim #286 have implemented the SmartRouter infrastructure for the EdgeChains JS SDK to provide reliable model routing, high availability, and better developer observability.

Key Features
429 Failover: Automatically switches between configured providers (OpenAI, Gemini, Cohere) when a rate limit is hit, ensuring zero downtime for the user.

Load Balancing: Intelligent deployment selection based on real-time token tracking and provider availability.

Observability: Integrated Sentry for granular error reporting and PostHog for tracking usage patterns.

Adapters: Added production-ready adapters for Cohere, Gemini, and OpenAI.

Verification
Tests: Successfully passed 22/22 unit tests covering SmartRouter logic, TokenTracker, and Failover scenarios.

Type Safety: npx tsc --noEmit shows 0 errors.

Demo Video: Proof of execution and passing tests attached below.

proof.mp4

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

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

@shehzada9933
Copy link
Copy Markdown
Author

recheck

@shehzada9933
Copy link
Copy Markdown
Author

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

@shehzada9933
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