-
Notifications
You must be signed in to change notification settings - Fork 23
feat: add a disabled-by-default Slotstream AI Providers preset #6223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
atomantic
merged 1 commit into
atomantic:main
from
Bryandero98:feat/slotstream-weights-provider-preset
Sep 4, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /** | ||
| * Ship a disabled Slotstream provider preset to existing installs. | ||
| * | ||
| * Slotstream is a separately managed local runtime (SSD-streaming MoE) — | ||
| * see docs/features/slotstream.md. It answers ordinary text tasks through its | ||
| * loopback OpenAI-compatible endpoint the same way MTPLX's API preset does | ||
| * (migration 272): text-only, so no CLI/TUI variant is registered — Slotstream | ||
| * is not a valid CoS coding-agent runner. | ||
| * | ||
| * This migration deliberately does not install Slotstream, download a | ||
| * checkpoint, start a daemon, or contact its endpoint. The preset is disabled | ||
| * by default. An install that already owns this id is left untouched, | ||
| * preserving refreshed models and local endpoint edits. | ||
| * | ||
| * Kept in lockstep with data.reference/providers.json and | ||
| * server/lib/aiToolkit/defaults/providers.sample.json. This frozen literal is | ||
| * the historical upgrade payload; later default changes require a new | ||
| * migration rather than rewriting this record. | ||
| */ | ||
|
|
||
| import { makeProviderSeedMigration } from './_lib.js'; | ||
|
|
||
| const SLOTSTREAM_API = { | ||
| id: 'slotstream', | ||
| name: 'Slotstream (SSD-streaming MoE)', | ||
| type: 'api', | ||
| endpoint: 'http://127.0.0.1:5564/v1', | ||
| apiKey: '', | ||
| models: ['qwen3-235b-a22b-4bit', 'gpt-oss-120b-mxfp4', 'qwen3-30b-a3b-4bit'], | ||
| defaultModel: 'qwen3-235b-a22b-4bit', | ||
| timeout: 300000, | ||
| enabled: false, | ||
| envVars: {}, | ||
| }; | ||
|
|
||
| export default makeProviderSeedMigration({ | ||
| label: 'Slotstream', | ||
| defs: [SLOTSTREAM_API], | ||
| }); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| /** | ||
| * Test for migration 340 — add the Slotstream provider preset to existing | ||
| * installs. The shared idempotent write shell is asserted in _lib.test.js; | ||
| * this test pins migration 340's frozen payload and its disabled-by-default, | ||
| * text-only contract (no CLI/TUI variant — see migration 272 for why MTPLX | ||
| * gets one and Slotstream does not). | ||
| */ | ||
| import { describe, it, expect, beforeEach, afterEach } from 'vitest'; | ||
| import { mkdtempSync, rmSync, writeFileSync, readFileSync, mkdirSync } from 'fs'; | ||
| import { tmpdir } from 'os'; | ||
| import { join } from 'path'; | ||
|
|
||
| import migration from './340-slotstream-provider.js'; | ||
|
|
||
| const writeJson = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n'); | ||
| const readJson = (path) => JSON.parse(readFileSync(path, 'utf-8')); | ||
|
|
||
| describe('migration 340 — Slotstream provider', () => { | ||
| let rootDir; | ||
| let providersPath; | ||
|
|
||
| beforeEach(() => { | ||
| rootDir = mkdtempSync(join(tmpdir(), 'migration-340-')); | ||
| mkdirSync(join(rootDir, 'data'), { recursive: true }); | ||
| providersPath = join(rootDir, 'data/providers.json'); | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| rmSync(rootDir, { recursive: true, force: true }); | ||
| }); | ||
|
|
||
| it('adds a disabled API preset without touching existing state', async () => { | ||
| writeJson(providersPath, { | ||
| activeProvider: 'claude-code', | ||
| providers: { 'claude-code': { id: 'claude-code', type: 'cli', command: 'claude' } }, | ||
| }); | ||
|
|
||
| await migration.up({ rootDir }); | ||
|
|
||
| const out = readJson(providersPath); | ||
| const api = out.providers.slotstream; | ||
|
|
||
| expect(api).toMatchObject({ | ||
| id: 'slotstream', | ||
| type: 'api', | ||
| endpoint: 'http://127.0.0.1:5564/v1', | ||
| models: ['qwen3-235b-a22b-4bit', 'gpt-oss-120b-mxfp4', 'qwen3-30b-a3b-4bit'], | ||
| defaultModel: 'qwen3-235b-a22b-4bit', | ||
| enabled: false, | ||
| }); | ||
|
|
||
| // Text-only: no opencode-slotstream CLI/TUI wrapper, unlike MTPLX. | ||
| expect(out.providers['opencode-slotstream']).toBeUndefined(); | ||
| expect(out.providers['opencode-slotstream-tui']).toBeUndefined(); | ||
|
|
||
| expect(out.providers['claude-code']).toBeDefined(); | ||
| expect(out.activeProvider).toBe('claude-code'); | ||
| }); | ||
|
|
||
| it('preserves an existing Slotstream provider instead of replacing its local edits', async () => { | ||
| const existing = { | ||
| id: 'slotstream', name: 'My Slotstream', type: 'api', endpoint: 'http://127.0.0.1:5564/v1', enabled: true, | ||
| }; | ||
| writeJson(providersPath, { providers: { slotstream: existing } }); | ||
|
|
||
| await migration.up({ rootDir }); | ||
|
|
||
| expect(readJson(providersPath).providers.slotstream).toEqual(existing); | ||
| }); | ||
| }); |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Non-blocking — Row also adds MTPLX, which the linked issue did not ask for
Issue #5816 asked to list the new Slotstream page under the product surface map; this row additionally adds MTPLX and its doc link to the same cell, which the issue never requested. The mention is accurate (docs/features/mtplx.md exists) and corrects a real omission in the very row being updated, so it is a scope note, not a blocker; split it out only if the maintainers want strict single-issue scope.