Repository navigation
feat: add OpenScale provider - #135
Merged
veerareddyvishal144 merged 1 commit intoNov 5, 2026
Merged
Conversation
Adds OpenScale (DeepSeek V4.1 Flash, GLM 5.3 Flash) as a first-class OpenAI-compatible provider, following the same path as AtmoRouter: MODEL_PROVIDER=openscale, OPENSCALE_API_KEY / OPENSCALE_MODEL / OPENSCALE_ENDPOINT, tier selection (TIER_*=openscale:<model>), init wizard entry, providers API, routing, SSE transform, reasoning_content relay, docs and an integration test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 10 selected item(s). |
Contributor
|
Thank you so much for your contribution @ffahleraz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OpenScale as a first-class provider (
MODEL_PROVIDER=openscale). OpenScale serves DeepSeek V4.1 Flash and GLM 5.3 Flash through an OpenAI-compatible Chat Completions API. The change follows #133 and the AtmoRouter provider file for file: same 15 files, same invoker shape, same tests.Keys are created at app.openscale.so/app/keys. The model list, with context windows, limits and prices, is at
GET https://api.openscale.so/v1/models(public, no key).Changes
src/config/index.js:OPENSCALE_API_KEY,OPENSCALE_MODEL(defaultdeepseek/deepseek-v4.1-flash),OPENSCALE_ENDPOINT(defaulthttps://api.openscale.so/v1/chat/completions); added toSUPPORTED_MODEL_PROVIDERS, the primary key check, the fallback checks andreloadConfig().src/clients/databricks.js:invokeOpenScale()with the same Anthropic to Chat Completions conversion, tool handling, no replay of billable POSTs, and 429 escalation asinvokeRuncrate(); registered inPROVIDER_INVOKERSand exported.src/routing/index.js,src/routing/model-tiers.js,src/orchestrator/index.js,src/orchestrator/sse-transformer.js,src/clients/provider-capabilities.js,src/api/providers-handler.js: same entries as the other OpenAI-compatible providers.bin/lynkr-init.js: OpenScale in the init wizard andPROVIDER_ORDER..env.example,README.md,documentation/providers.md(section 8e): configuration and tier examples.test/openscale-integration.test.js(mirrorstest/runcrate-integration.test.js),test/dispatch-registry.test.js, and the new test added totest:unitinpackage.json.Testing
node --test test/openscale-integration.test.js test/runcrate-integration.test.js test/atmorouter-integration.test.js test/cheaperinference-integration.test.js test/dispatch-registry.test.js test/init.test.js(with thetest:unitenv vars): 49 tests, 49 pass, 0 fail.npx eslint src index.js: no errors.npm run test:unit: 1561 pass, 94 fail, 10 cancelled on this branch; 1555 pass, 94 fail, 10 cancelled on unmodifiedmain(dd73bbf) on the same machine. The failing test names are identical, so these failures are not from this change, and the 6 new tests pass.MODEL_PROVIDER=openscaleagainsthttps://api.openscale.so/v1/chat/completions, using Claude Code-style/v1/messagesrequests. All returned HTTP 200:deepseek/deepseek-v4.1-flash: plain message (end_turn, exact expected text), streaming (end_turn),get_weathertool call with{"city": "Jakarta"}(tool_use), tool result round-trip (end_turn).z-ai/glm-5.3-flash: tool result round-trip (end_turn), streaming tool call with a thinking block and{"city": "Jakarta"}(tool_use).This PR was prepared with AI assistance: an AI coding agent wrote the change and ran the checks above.
Disclosure: I work on OpenScale.
🤖 Generated with Claude Code