fix: 修复Claude模型禁用tools和跳过禁用节点健康检查
当模型是Claude时,禁止使用tools配置 在UI API请求处理中跳过已禁用节点的健康检查
This commit is contained in:
parent
8f39295655
commit
01496aab8a
2 changed files with 17 additions and 0 deletions
|
|
@ -289,6 +289,16 @@ function geminiToAntigravity(modelName, payload, projectId) {
|
|||
}
|
||||
template.request.toolConfig.functionCallingConfig.mode = 'VALIDATED';
|
||||
|
||||
// 当模型是 Claude 时,禁止使用 tools
|
||||
if (isClaudeModel) {
|
||||
if (template.request.tools) {
|
||||
delete template.request.tools;
|
||||
}
|
||||
if (template.request.toolConfig) {
|
||||
delete template.request.toolConfig;
|
||||
}
|
||||
}
|
||||
|
||||
// 对于非 Claude 模型,删除 maxOutputTokens
|
||||
// Claude 模型需要保留 maxOutputTokens
|
||||
if (!isClaudeModel) {
|
||||
|
|
|
|||
|
|
@ -1313,6 +1313,13 @@ export async function handleUIApiRequests(method, pathParam, req, res, currentCo
|
|||
const results = [];
|
||||
for (const providerStatus of providers) {
|
||||
const providerConfig = providerStatus.config;
|
||||
|
||||
// 跳过已禁用的节点
|
||||
if (providerConfig.isDisabled) {
|
||||
console.log(`[UI API] Skipping health check for disabled provider: ${providerConfig.uuid}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
// 传递 forceCheck = true 强制执行健康检查,忽略 checkHealth 配置
|
||||
const healthResult = await providerPoolManager._checkProviderHealth(providerType, providerConfig, true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue