fix: select capable models and align effective permission evidence

This commit is contained in:
Agent Workbench Dev
2026-11-07 00:18:24 +08:00
parent 762597b99d
commit dcaecd8b0a
18 changed files with 572 additions and 43 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ export class Provider {
};
const assertIdentity = () => {
const identity = receipt.modelIdentity;
if (config.executionMode === 'unrestricted' || !identity || identity.policy !== 'require-match' || modelIdentityAccepted(identity)) return;
if (!identity || identity.effectivePolicy !== 'require-match' || modelIdentityAccepted(identity)) return;
throw new ModelRequestError({ ...context, source: 'model_connection', origin: 'local', stage: 'model_identity', kind: 'model_identity',
title: '模型返回型号需要核对', message: modelIdentityLabel(identity) + '。本次响应及用量已保留,工具未执行;核对连接或型号映射后显式续接。',
modelIdentity: identity, retryable: false, failoverAllowed: false, outcome: 'failed', occurredAt: new Date().toISOString() });