From 61f766f9eaa7dae5ad321dca60dcaa544b554267 Mon Sep 17 00:00:00 2001 From: functionstackx <47992694+functionstackx@users.noreply.github.com> Date: Mon, 8 Jun 2026 19:31:22 -0400 Subject: [PATCH] feat(inference): default to DeepSeek-V4-Pro model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the default selected model on page load from DeepSeek-R1-0528 to DeepSeek-V4-Pro. Updates the GlobalFilterContext initial state and the PARAM_DEFAULTS used to omit redundant g_model from share URLs. - GlobalFilterContext: default selectedModel → Model.DeepSeek_V4_Pro - url-state PARAM_DEFAULTS.g_model → 'DeepSeek-V4-Pro' (so the new default is omitted from share links) - url-state tests: assert the new default and swap the omit/preserve fixtures accordingly - model-architecture e2e: pin to ?g_model=DeepSeek-R1-0528 explicitly, since R1 (not the new default DSv4-Pro, which has no architecture diagram entry) is what those tests exercise Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/app/cypress/e2e/model-architecture.cy.ts | 7 +++++-- packages/app/src/components/GlobalFilterContext.tsx | 2 +- packages/app/src/lib/url-state.test.ts | 10 +++++----- packages/app/src/lib/url-state.ts | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/app/cypress/e2e/model-architecture.cy.ts b/packages/app/cypress/e2e/model-architecture.cy.ts index dd8d3722..30cadbb4 100644 --- a/packages/app/cypress/e2e/model-architecture.cy.ts +++ b/packages/app/cypress/e2e/model-architecture.cy.ts @@ -2,7 +2,10 @@ describe('Model Architecture Diagram', () => { before(() => { // Use desktop viewport to ensure all UI elements are visible cy.viewport(1280, 800); - cy.visit('/inference', { + // Pin to DeepSeek R1 — it has a rich architecture diagram (MoE + dense blocks) + // that the tests below exercise. The app's default model is DeepSeek V4 Pro, + // which has no architecture entry, so we select R1 explicitly via URL. + cy.visit('/inference?g_model=DeepSeek-R1-0528', { onBeforeLoad(win) { win.localStorage.setItem('inferencex-star-modal-dismissed', String(Date.now())); }, @@ -11,7 +14,7 @@ describe('Model Architecture Diagram', () => { cy.get('[data-testid="inference-chart-display"]').should('be.visible'); }); - it('architecture toggle renders for default model (DeepSeek R1) with MoE badges', () => { + it('architecture toggle renders for DeepSeek R1 with MoE badges', () => { cy.get('[data-testid="model-architecture-toggle"]').should('be.visible'); cy.get('[data-testid="model-architecture-toggle"]').should( 'contain.text', diff --git a/packages/app/src/components/GlobalFilterContext.tsx b/packages/app/src/components/GlobalFilterContext.tsx index d2a171ee..62ae64ff 100644 --- a/packages/app/src/components/GlobalFilterContext.tsx +++ b/packages/app/src/components/GlobalFilterContext.tsx @@ -141,7 +141,7 @@ export function GlobalFilterProvider({ // ── Core filter state ───────────────────────────────────────────────────── const [selectedModel, setSelectedModel] = useState( - () => initialModel ?? Model.DeepSeek_R1, + () => initialModel ?? Model.DeepSeek_V4_Pro, ); const [selectedSequence, setSelectedSequence] = useState(() => { diff --git a/packages/app/src/lib/url-state.test.ts b/packages/app/src/lib/url-state.test.ts index 12dd1ef4..e34b32b4 100644 --- a/packages/app/src/lib/url-state.test.ts +++ b/packages/app/src/lib/url-state.test.ts @@ -27,7 +27,7 @@ describe('PARAM_DEFAULTS', () => { it('has expected default for g_model', async () => { const { PARAM_DEFAULTS } = await import('@/lib/url-state'); - expect(PARAM_DEFAULTS.g_model).toBe('DeepSeek-R1-0528'); + expect(PARAM_DEFAULTS.g_model).toBe('DeepSeek-V4-Pro'); }); it('has expected default for i_seq', async () => { @@ -164,7 +164,7 @@ describe('writeUrlParams + buildShareUrl', () => { const { writeUrlParams, buildShareUrl } = await import('@/lib/url-state'); // write default value, should be omitted - writeUrlParams({ g_model: 'DeepSeek-R1-0528' }); + writeUrlParams({ g_model: 'DeepSeek-V4-Pro' }); await vi.advanceTimersByTimeAsync(200); const url = buildShareUrl(); @@ -375,14 +375,14 @@ describe('buildShareUrl unofficialrun handling', () => { }); it('preserves unofficialruns alongside other in-memory share params', async () => { - setupWindow('?unofficialruns=111&g_model=DeepSeek-R1-0528', '/inference'); + setupWindow('?unofficialruns=111&g_model=DeepSeek-V4-Pro', '/inference'); const { writeUrlParams, buildShareUrl } = await import('@/lib/url-state'); - writeUrlParams({ g_model: 'DeepSeek-V4-Pro' }); + writeUrlParams({ g_model: 'DeepSeek-R1-0528' }); await vi.advanceTimersByTimeAsync(200); const url = buildShareUrl(); - expect(url).toContain('g_model=DeepSeek-V4-Pro'); + expect(url).toContain('g_model=DeepSeek-R1-0528'); expect(url).toContain('unofficialruns=111'); }); diff --git a/packages/app/src/lib/url-state.ts b/packages/app/src/lib/url-state.ts index ebaa5336..a5ba51d7 100644 --- a/packages/app/src/lib/url-state.ts +++ b/packages/app/src/lib/url-state.ts @@ -60,7 +60,7 @@ export type UrlStateParams = Partial>; /** Default values for each parameter. Params matching their default are omitted from share URLs. */ export const PARAM_DEFAULTS: Record = { - g_model: 'DeepSeek-R1-0528', + g_model: 'DeepSeek-V4-Pro', g_rundate: '', g_runid: '', i_seq: '8k/1k',