fix(routing): 消除模型路由链路硬编码不匹配模型名
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

summarizer_adapter.rs 和 saas-relay-client.ts 中的 fallback 模型名
(glm-4-flash / glm-4-flash-250414) 在 SaaS relay 中不存在,导致请求被拒绝。
改为未配置时明确报错(fail fast),不再静默使用错误模型。
This commit is contained in:
iven
2026-04-11 23:08:06 +08:00
parent 5fcc4c99c1
commit e1af3cca03
4 changed files with 111 additions and 2 deletions

View File

@@ -31,7 +31,9 @@ impl TauriSummaryDriver {
async fn call_llm(&self, prompt: String) -> Result<String, String> {
let client = reqwest::Client::new();
let model = self.model.clone().unwrap_or_else(|| "glm-4-flash".to_string());
let model = self.model.clone().ok_or_else(|| {
"Summary driver model not configured — kernel_init must be called first".to_string()
})?;
let request = serde_json::json!({
"model": model,