mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-12 14:10:19 +08:00
Clarify API key concurrency skip reasons
This commit is contained in:
@@ -1356,15 +1356,22 @@ const currentAttemptKeyFormatsDisplay = computed(() => {
|
||||
.map(format => formatApiFormat(format))
|
||||
.join(' / ')
|
||||
})
|
||||
const SKIP_REASON_LABELS: Record<string, string> = {
|
||||
auth_api_key_concurrency_limit_reached: '调用方 API Key 并发已达上限',
|
||||
api_key_concurrency_limit_reached: '调用方 API Key 并发已达上限',
|
||||
pool_key_lease_busy: '池内账号正被其他请求占用',
|
||||
provider_concurrency_limit_reached: '上游提供商并发已达上限',
|
||||
provider_key_concurrency_limit_reached: '上游账号并发已达上限',
|
||||
provider_request_body_build_failed: '上游请求体转换失败',
|
||||
provider_request_body_missing: '无法构建上游请求体',
|
||||
}
|
||||
const currentAttemptSkipReasonDisplay = computed(() => {
|
||||
const attempt = currentAttempt.value
|
||||
if (!attempt?.skip_reason) return ''
|
||||
|
||||
if (attempt.skip_reason === 'provider_request_body_build_failed') {
|
||||
return '上游请求体转换失败'
|
||||
}
|
||||
if (attempt.skip_reason === 'provider_request_body_missing') {
|
||||
return '无法构建上游请求体'
|
||||
const skipReasonLabel = SKIP_REASON_LABELS[attempt.skip_reason]
|
||||
if (skipReasonLabel) {
|
||||
return skipReasonLabel
|
||||
}
|
||||
|
||||
if (attempt.skip_reason !== 'transport_unsupported') {
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
<Badge
|
||||
v-if="getFastBadge(record)"
|
||||
variant="outline"
|
||||
class="h-4 rounded-full border-slate-200 bg-white px-1.5 text-[10px] leading-4 text-slate-900 shadow-sm dark:border-white/50 dark:bg-white dark:text-slate-950 flex-shrink-0"
|
||||
class="h-4 rounded-full px-1.5 text-[10px] leading-4 flex-shrink-0"
|
||||
:title="getFastBadgeTitle(record)"
|
||||
>
|
||||
fast
|
||||
@@ -601,22 +601,6 @@
|
||||
>
|
||||
<div class="flex min-w-0 items-center gap-1">
|
||||
<span class="truncate">{{ record.model }}</span>
|
||||
<Badge
|
||||
v-if="getReasoningEffort(record)"
|
||||
variant="outline"
|
||||
class="h-4 rounded-full border-primary/30 bg-primary/5 px-1.5 text-[10px] leading-4 text-primary flex-shrink-0"
|
||||
:title="getReasoningEffortTitle(record)"
|
||||
>
|
||||
{{ getReasoningEffort(record) }}
|
||||
</Badge>
|
||||
<Badge
|
||||
v-if="getFastBadge(record)"
|
||||
variant="outline"
|
||||
class="h-4 rounded-full border-slate-200 bg-white px-1.5 text-[10px] leading-4 text-slate-900 shadow-sm dark:border-white/50 dark:bg-white dark:text-slate-950 flex-shrink-0"
|
||||
:title="getFastBadgeTitle(record)"
|
||||
>
|
||||
fast
|
||||
</Badge>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
@@ -629,6 +613,22 @@
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
<Badge
|
||||
v-if="getReasoningEffort(record)"
|
||||
variant="outline"
|
||||
class="h-4 rounded-full border-primary/30 bg-primary/5 px-1.5 text-[10px] leading-4 text-primary flex-shrink-0"
|
||||
:title="getReasoningEffortTitle(record)"
|
||||
>
|
||||
{{ getReasoningEffort(record) }}
|
||||
</Badge>
|
||||
<Badge
|
||||
v-if="getFastBadge(record)"
|
||||
variant="outline"
|
||||
class="h-4 rounded-full border-amber-500/30 bg-amber-500/5 px-1.5 text-[10px] leading-4 text-amber-600 dark:text-amber-400 flex-shrink-0"
|
||||
:title="getFastBadgeTitle(record)"
|
||||
>
|
||||
fast
|
||||
</Badge>
|
||||
</div>
|
||||
<span class="text-muted-foreground truncate">{{ getActualModel(record) }}</span>
|
||||
</div>
|
||||
@@ -648,7 +648,7 @@
|
||||
<Badge
|
||||
v-if="getFastBadge(record)"
|
||||
variant="outline"
|
||||
class="h-4 rounded-full border-slate-200 bg-white px-1.5 text-[10px] leading-4 text-slate-900 shadow-sm dark:border-white/50 dark:bg-white dark:text-slate-950 flex-shrink-0"
|
||||
class="h-4 rounded-full px-1.5 text-[10px] leading-4 flex-shrink-0"
|
||||
:title="getFastBadgeTitle(record)"
|
||||
>
|
||||
fast
|
||||
|
||||
Reference in New Issue
Block a user