Fix verified image pricing and settle async image usage

This commit is contained in:
wlx committed 2026-10-13 20:13:21 +08:00
1 parent 4c4f5ad68d
commit 8a13ef9c02
22 files changed
+506 -40

No files matched your search

+7 -4
View File
@@ -348,15 +348,17 @@ function hasCallableGroup(model: GalleryModel) {
function modelAvailabilityLabel(model: GalleryModel) {
if (!model.groups.length) return '待上线'
if (model.groups.every(group => group.integrationDeferred)) return '暂不接入'
if (hasCallableGroup(model)) return '在线'
if (model.mode === '异步' && model.groups.some(group => group.pricingConfigured && group.executionReady === false)) return '异步执行器待接入'
if (model.mode === '异步' && model.groups.some(group => group.pricingConfigured && group.billingReady === false)) return '异步按任务计费待配置'
if (model.mode === '异步' && model.groups.some(group => group.pricingConfigured && group.billingReady === false)) return '用量计费待核实'
return '价格待配置'
}
function modelUnavailableLabel(model: GalleryModel) {
if (model.groups.length && model.groups.every(group => group.integrationDeferred)) return '暂不接入'
if (model.mode === '异步' && model.groups.some(group => group.pricingConfigured && group.executionReady === false)) return '异步执行器待接入'
if (model.mode === '异步' && model.groups.some(group => group.pricingConfigured && group.billingReady === false)) return '异步按任务计费待配置'
if (model.mode === '异步' && model.groups.some(group => group.pricingConfigured && group.billingReady === false)) return '用量计费待核实'
return '价格待配置'
}
@@ -617,7 +619,7 @@ function mapCatalogModels(items: unknown, providers: unknown): ModelItem[] {
...mapCatalogModel(item), logicalModelId: item.logicalModelId, gatewayModelId: item.gatewayModelId,
provider: providerNames.get(providerId) || providerId || '未知渠道',
vendorName: model.vendorName,
sourceLabel: model.sourceLabel, pricing: model.pricing, pricingConfigured: model.pricingConfigured, billingReady: model.billingReady, priority: model.priority, maxConcurrency: model.maxConcurrency, executionReady: model.executionReady, inputTypes, outputTypes,
sourceLabel: model.sourceLabel, pricing: model.pricing, pricingConfigured: model.pricingConfigured, billingReady: model.billingReady, billingReason: model.billingReason, integrationDeferred: model.integrationDeferred, priority: model.priority, maxConcurrency: model.maxConcurrency, executionReady: model.executionReady, inputTypes, outputTypes,
}
})
}
@@ -975,7 +977,8 @@ $env:OPENAI_API_KEY="你的 MOYI 用户 API Key"
<label>调用模型 ID <code>{{ gatewayModelId(group) }}</code></label>
<button class="text-link" @click="copy(gatewayModelId(group), '调用模型 ID', gatewayModelId(group))"><Copy :size="14" />{{ copySucceeded(gatewayModelId(group)) ? '已复制' : '复制调用 ID' }}</button>
<small class="drawer-pricing">标准价:{{ groupStandardPriceLabel(group) }} · {{ groupPriceLabel(group) }} · 对外 {{ groupDiscountLabel(group) }}</small>
<button class="button secondary" :disabled="!group.pricingConfigured || group.billingReady === false || group.executionReady === false" @click="tryModel({ ...selectedModel, groups: [group] })">{{ !group.pricingConfigured ? '价格待配置' : group.executionReady === false ? '异步执行器待接入' : group.billingReady === false ? '异步按任务计费待配置' : '试用此分组' }}</button>
<p v-if="group.billingReason" class="request-unavailable">{{ group.billingReason }}</p>
<button class="button secondary" :disabled="!group.pricingConfigured || group.billingReady === false || group.executionReady === false" @click="tryModel({ ...selectedModel, groups: [group] })">{{ group.integrationDeferred ? '暂不接入' : !group.pricingConfigured ? '报价待核实' : group.executionReady === false ? '执行接口待接入' : group.billingReady === false ? '用量计费待核实' : '试用此分组' }}</button>
</section>
<template #footer><button class="button primary full" :disabled="!hasCallableGroup(selectedModel)" @click="tryModel(selectedModel)"><Play :size="16" />{{ !selectedModel.groups.length ? '分组待上线' : hasCallableGroup(selectedModel) ? '在线试用' : modelUnavailableLabel(selectedModel) }}</button><button class="button secondary full" @click="selectedModel = null; emit('navigate', 'docs')"><BookOpen :size="16" />查看文档</button></template>
</SlidePanel>