mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 10:27:46 +08:00
fix(usage): unify OpenAI Live and WebSocket records
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
:lookback-hours="lookbackHours"
|
||||
:fallback-segments="segmentCount ?? GRID_COUNT"
|
||||
entity-label="端点"
|
||||
:entity-name="monitor?.api_format"
|
||||
:entity-name="monitor?.api_format ? formatApiFormat(monitor.api_format) : undefined"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
@@ -51,6 +51,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { EndpointStatusMonitor, EndpointHealthEvent, PublicEndpointStatusMonitor, PublicHealthEvent } from '@/api/endpoints'
|
||||
import { formatApiFormat } from '@/api/endpoints/types/api-format'
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import HealthStatusTimeline from './HealthStatusTimeline.vue'
|
||||
import { formatTimestamp, formatTimelineTooltip } from './health-monitor-utils'
|
||||
@@ -225,7 +226,7 @@ function buildSegmentTooltip(
|
||||
avg_tps: null
|
||||
},
|
||||
entityLabel: '端点',
|
||||
entityName: props.monitor?.api_format
|
||||
entityName: props.monitor?.api_format ? formatApiFormat(props.monitor.api_format) : undefined
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -478,6 +478,7 @@ import {
|
||||
groupApiFormats,
|
||||
parseApiFormat,
|
||||
API_FORMAT_KIND_LABELS,
|
||||
formatApiFormat,
|
||||
formatApiFormatShort,
|
||||
normalizeApiFormatAlias,
|
||||
} from '@/api/endpoints/types/api-format'
|
||||
@@ -573,7 +574,7 @@ function poolKeySummary(key: KeyWithMeta): string {
|
||||
}
|
||||
|
||||
function emptyFormatKeyText(format: string): string {
|
||||
return legacyT(`暂无 ${format} 格式的 Key`)
|
||||
return legacyT(`暂无 ${formatApiFormat(format)} 格式的 Key`)
|
||||
}
|
||||
|
||||
function localizedApiError(error: unknown, fallback: string): string {
|
||||
|
||||
@@ -373,6 +373,7 @@ import {
|
||||
type ProviderModelAlias,
|
||||
type ProviderMappingPreviewResponse,
|
||||
} from '@/api/endpoints'
|
||||
import { formatApiFormat } from '@/api/endpoints/types/api-format'
|
||||
import { type EndpointAPIKey } from '@/api/endpoints/keys'
|
||||
import { updateModel } from '@/api/endpoints/models'
|
||||
import { useI18n } from '@/i18n'
|
||||
@@ -907,7 +908,7 @@ async function handleStartMappingTest() {
|
||||
await modelTest.startTest({
|
||||
mode: 'direct',
|
||||
modelName: testingModelName.value,
|
||||
displayLabel: `[${endpoint.api_format}] 映射 "${testingModelName.value}"`,
|
||||
displayLabel: `[${formatApiFormat(endpoint.api_format)}] 映射 "${testingModelName.value}"`,
|
||||
apiFormat: endpoint.api_format,
|
||||
endpointId: endpoint.id,
|
||||
endpointBaseUrl: endpoint.base_url,
|
||||
|
||||
Reference in New Issue
Block a user