This commit is contained in:
SunSeekerX
2026-01-21 11:55:28 +08:00
149 changed files with 15035 additions and 4017 deletions

View File

@@ -90,7 +90,7 @@ class DroidRelayService {
return normalizedBody
}
async _applyRateLimitTracking(rateLimitInfo, usageSummary, model, context = '') {
async _applyRateLimitTracking(rateLimitInfo, usageSummary, model, context = '', keyId = null) {
if (!rateLimitInfo) {
return
}
@@ -99,7 +99,9 @@ class DroidRelayService {
const { totalTokens, totalCost } = await updateRateLimitCounters(
rateLimitInfo,
usageSummary,
model
model,
keyId,
'droid'
)
if (totalTokens > 0) {
@@ -606,7 +608,8 @@ class DroidRelayService {
clientRequest?.rateLimitInfo,
usageSummary,
model,
' [stream]'
' [stream]',
keyId
)
logger.success(`Droid stream completed - Account: ${account.name}`)
@@ -1225,7 +1228,8 @@ class DroidRelayService {
clientRequest?.rateLimitInfo,
usageSummary,
model,
endpointLabel
endpointLabel,
keyId
)
logger.success(