From 46c290562b9fa329872f3fc58f365903f92b2132 Mon Sep 17 00:00:00 2001 From: Hunter Phillips Date: Wed, 7 Jan 2026 21:00:39 -0600 Subject: [PATCH] demo models --- client/src/lib/types.ts | 2 +- client/src/store/config-store.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/client/src/lib/types.ts b/client/src/lib/types.ts index 48a3b9d..f8ffc97 100644 --- a/client/src/lib/types.ts +++ b/client/src/lib/types.ts @@ -2,7 +2,7 @@ export interface AvailableModels { openai: string[]; anthropic: string[]; google: string[]; - ollama: string[]; + ollama?: string[]; } export interface Tool { diff --git a/client/src/store/config-store.ts b/client/src/store/config-store.ts index f2e2d15..7db594f 100644 --- a/client/src/store/config-store.ts +++ b/client/src/store/config-store.ts @@ -2,6 +2,22 @@ import { create } from 'zustand'; import type { ConfigState, AvailableModels, Chat } from '@/lib/types'; const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3001'; +const isDemoMode = import.meta.env.VITE_DEMO_MODE === 'true'; +const DEMO_MODELS = { + openai: ['gpt-5.1', 'gpt-5-mini', 'gpt-4.1', 'gpt-4.1-mini'], + anthropic: [ + 'claude-opus-4-5', + 'claude-opus-4-1', + 'claude-sonnet-4', + 'claude-haiku-4-5', + ], + google: [ + 'gemini-3-pro-preview', + 'gemini-2.5-pro', + 'gemini-2.5-flash', + 'gemini-2.5-flash-lite', + ], +}; export const useConfigStore = create((set, get) => ({ currentProvider: 'openai', @@ -66,6 +82,10 @@ export const useConfigStore = create((set, get) => ({ }, fetchModels: async () => { + if (isDemoMode) { + set({ availableModels: DEMO_MODELS }); + return; + } try { const response = await fetch(`${API_URL}/api/models`); if (!response.ok) {