diff --git a/VERSION b/VERSION index a1a4224..965a689 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.13.3 +2.13.4 diff --git a/src/plugins/api-potluck/index.js b/src/plugins/api-potluck/index.js index 48a9eb9..4839cfd 100644 --- a/src/plugins/api-potluck/index.js +++ b/src/plugins/api-potluck/index.js @@ -51,13 +51,15 @@ function normalizeUsageCandidate(candidate) { candidate.prompt_tokens ?? usage?.prompt_tokens ?? usage?.input_tokens ?? - usage?.promptTokenCount + usage?.promptTokenCount ?? + usage?.inputTokenCount ); const completionTokens = toNumber( candidate.completion_tokens ?? usage?.completion_tokens ?? usage?.output_tokens ?? - usage?.candidatesTokenCount + usage?.candidatesTokenCount ?? + usage?.outputTokenCount ); const totalTokens = toNumber( candidate.total_tokens ?? diff --git a/src/utils/common.js b/src/utils/common.js index b65929d..b8d50ae 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -1025,7 +1025,7 @@ export async function handleContentGenerationRequest(req, res, service, endpoint // - 凭证切换重试:凭证被标记不健康后切换到其他凭证 // 当没有不同的健康凭证可用时,重试会自动停止 const credentialSwitchMaxRetries = CONFIG.CREDENTIAL_SWITCH_MAX_RETRIES || 5; - const retryContext = providerPoolManager ? { CONFIG, currentRetry: 0, maxRetries: credentialSwitchMaxRetries } : null; + const retryContext = { CONFIG, currentRetry: 0, maxRetries: credentialSwitchMaxRetries }; if (isStream) { await handleStreamRequest(res, service, model, processedRequestBody, fromProvider, toProvider, CONFIG.PROMPT_LOG_MODE, PROMPT_LOG_FILENAME, providerPoolManager, actualUuid, actualCustomName, retryContext); diff --git a/static/model-usage-stats.html b/static/model-usage-stats.html index 28b64a7..6a9b33e 100644 --- a/static/model-usage-stats.html +++ b/static/model-usage-stats.html @@ -103,7 +103,7 @@ import{initThemeSwitcher,setTheme,getCurrentTheme}from'./app/theme-switcher.js';setTheme(getCurrentTheme());initThemeSwitcher('themeToggle');