Skip to content

feat: add OpenScale provider - #135

Merged
veerareddyvishal144 merged 1 commit into
Fast-Editor:mainfrom
ffahleraz:feat/openscale-provider
Nov 5, 2026
Merged

veerareddyvishal144 merged 1 commit into
Fast-Editor:mainfrom
ffahleraz:feat/openscale-provider

Conversation

@ffahleraz

Copy link
Copy Markdown
Contributor

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 (default deepseek/deepseek-v4.1-flash), OPENSCALE_ENDPOINT (default https://api.openscale.so/v1/chat/completions); added to SUPPORTED_MODEL_PROVIDERS, the primary key check, the fallback checks and reloadConfig().
  • src/clients/databricks.js: invokeOpenScale() with the same Anthropic to Chat Completions conversion, tool handling, no replay of billable POSTs, and 429 escalation as invokeRuncrate(); registered in PROVIDER_INVOKERS and 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 and PROVIDER_ORDER.
  • .env.example, README.md, documentation/providers.md (section 8e): configuration and tier examples.
  • test/openscale-integration.test.js (mirrors test/runcrate-integration.test.js), test/dispatch-registry.test.js, and the new test added to test:unit in package.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 the test:unit env 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 unmodified main (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.
  • Live check: Lynkr from this branch with MODEL_PROVIDER=openscale against https://api.openscale.so/v1/chat/completions, using Claude Code-style /v1/messages requests. All returned HTTP 200:
    • deepseek/deepseek-v4.1-flash: plain message (end_turn, exact expected text), streaming (end_turn), get_weather tool 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

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>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 10 selected item(s).

@veerareddyvishal144
veerareddyvishal144 merged commit 772afc8 into Fast-Editor:main Nov 5, 2026
2 of 3 checks passed
@veerareddyvishal144

Copy link
Copy Markdown
Contributor

Thank you so much for your contribution @ffahleraz

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.

2 participants