fix: 长上下文默认保持开启,并与 OpenAI 账号开关取交集

迁移默认 false 会让存量分组静默丢掉 ≥200k 阶梯与渠道多档价。
OpenAI 路径传入 Group 后,账号级 openai_long_context_billing_enabled 被顶掉。

- 列默认 TRUE,并对存量行回填
- 分组价卡不再手填 token 区间,勾选走官方/预设阶梯
- 分组开关与账号开关 AND;价卡 JSON 损坏时打 warn
This commit is contained in:
IanShaw027
2026-08-13 08:38:10 +08:00
parent 8c4c3c09ce
commit b830bc14d6
12 changed files with 134 additions and 36 deletions
@@ -134,8 +134,8 @@
</div>
</div>
<!-- Token intervals -->
<div class="mt-3">
<!-- Token intervals (channel-only; group long-context uses official presets) -->
<div v-if="!hideTokenIntervals" class="mt-3">
<div class="flex items-center justify-between">
<label class="text-xs font-medium text-gray-500 dark:text-gray-400">
{{ t('admin.channels.form.intervals') }}
@@ -245,10 +245,13 @@ import channelsAPI from '@/api/admin/channels'
const { t } = useI18n()
const props = defineProps<{
const props = withDefaults(defineProps<{
entry: PricingFormEntry
platform?: string
}>()
hideTokenIntervals?: boolean
}>(), {
hideTokenIntervals: false,
})
const emit = defineEmits<{
update: [entry: PricingFormEntry]