Add production-ready SmartRouter for JS SDK deployments#602
Add production-ready SmartRouter for JS SDK deployments#602yanruiyang517 wants to merge 28 commits into
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the Arakoo CLA Document and I hereby sign the CLA |
|
recheck |
|
All checks are passing now. Please let me know if any changes are needed. |
|
Rechecking the PR status: it is still open and mergeable, with the CLA and JS build checks passing. The change keeps the existing |
|
Completed the SmartRouter reliability refresh and revalidated the focused JS SDK paths. Final validation:
The refresh adds persistent 429 cooldowns with |
|
Final recheck completed. I found and fixed three provider-correctness gaps that were not covered by the earlier validation:
I also updated the Verification for the final refresh:
The PR description now accurately separates the previous clean 28-test run from the final provider-correctness regression coverage. Ready for maintainer review; upstream CI should be treated as authoritative for the final head. |
/claim #286
Closes #286
Summary
SmartRouterdeployments for OpenAI, Google, and Cohere.Retry-After.promptfield is never forwarded to the provider API.Retry-Afteraccess.OpenAIpublic class as a compatibility facade while routing its chat paths through SmartRouter.Provider and reliability coverage
Retry-AfterCompatibility decision
The issue text refers to endpoint classes from an older repository layout. In the current JS SDK, removing the exported
OpenAIclass and its embeddings/function/schema helpers would be an unrelated breaking API change. This PR therefore makesSmartRouterthe recommended path for all new chat/stream code while retaining the legacy class as a compatibility facade. The limitation and migration path are documented inlib/router/README.md.Validation
Clean repository validation completed before the final provider-correctness refresh:
Final provider-correctness refresh:
providerPayloadRegression.test.tswith 4 focused tests.Retry-Afterheader forms.Upstream CI remains the authoritative full-suite result for the final head.