fix: migrate glm-4-flash to glm-4-flash-250414 (model deprecated by Zhipu)
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

Zhipu AI has deprecated glm-4-flash, causing 404 errors on all chat requests.
Updated all references:
- config: glm-4-flash → glm-4-flash-250414, added glm-z1-flash
- frontend: defaultModel, conversationStore, ChatArea fallback, ModelsAPI
This commit is contained in:
iven
2026-04-09 18:42:47 +08:00
parent 5f47e62a46
commit 1965fa5269
6 changed files with 18 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ export function ChatArea({ compact, onOpenDetail }: { compact?: boolean; onOpenD
}
// Fallback: provide common models when no backend is connected
return [
{ id: 'glm-4-flash', name: 'GLM-4 Flash', provider: 'zhipu' },
{ id: 'glm-4-flash-250414', name: 'GLM-4 Flash (免费)', provider: 'zhipu' },
{ id: 'gpt-4o', name: 'GPT-4o', provider: 'openai' },
{ id: 'gpt-4o-mini', name: 'GPT-4o Mini', provider: 'openai' },
{ id: 'deepseek-chat', name: 'DeepSeek V3', provider: 'deepseek' },
@@ -575,7 +575,7 @@ export function ChatArea({ compact, onOpenDetail }: { compact?: boolean; onOpenD
);
}
function MessageBubble({ message, setInput }: { message: Message; setInput: (text: string) => void }) {
function MessageBubble({ message, setInput, onRetry }: { message: Message; setInput: (text: string) => void; onRetry?: () => void }) {
if (message.role === 'tool') {
return null;
}