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
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:
@@ -180,8 +180,15 @@ export function createSaaSRelayGatewayClient(
|
||||
? [...history, { role: 'user' as const, content: maskedMessage }]
|
||||
: [{ role: 'user' as const, content: maskedMessage }];
|
||||
|
||||
const model = getModel();
|
||||
if (!model) {
|
||||
callbacks.onError('No model available — please check SaaS relay configuration');
|
||||
callbacks.onComplete();
|
||||
return { runId };
|
||||
}
|
||||
|
||||
const body: Record<string, unknown> = {
|
||||
model: getModel() || 'glm-4-flash-250414',
|
||||
model,
|
||||
messages,
|
||||
stream: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user