fix: select capable models and align effective permission evidence
This commit is contained in:
@@ -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() });
|
||||
|
||||
Reference in New Issue
Block a user