mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-25 10:15:13 +08:00
支持 opus-4.7 模型,修复 outbox watermark 上下文过期导致 CPU 飙升的问题。 - 支持 opus-4.7 模型 - OpenAI API Key 账号调用 Claude Code 时注入 prompt_cache_key,提升缓存命中率 - 重构上游响应体读取逻辑,合并 9 处重复代码为统一的 ReadUpstreamResponseBody 函数 - 修复 outbox watermark 上下文过期导致水位线无法推进、相同事件反复处理引发 CPU 飙升的问题 - 修复 watermark 写入重试时复用已过期上下文的问题 - 新增同批次内 group rebuild 去重,减少约 80% 的冗余 rebuild 调用 - 上游返回 KYC 身份验证要求时停止账号调度 - 修复 OpenAI WS 标志在调度器缓存中丢失的问题 - 修复账号 UI 中连接池 WS 模式选项未显示的问题 # Conflicts: # backend/cmd/server/VERSION # backend/internal/server/api_contract_test.go # backend/internal/service/auth_service_register_test.go # backend/internal/service/billing_service_unified_test.go # backend/internal/service/channel.go # backend/internal/service/domain_constants.go # backend/internal/service/email_service.go # backend/internal/service/payment_config_providers.go # backend/internal/service/payment_refund.go # backend/internal/service/settings_view.go # frontend/src/api/payment.ts # frontend/src/components/account/AccountUsageCell.vue # frontend/src/utils/__tests__/usageLoadQueue.spec.ts
41 lines
936 B
TypeScript
41 lines
936 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import { resolve } from 'path'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
'vue-i18n': 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
|
|
}
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['src/__tests__/setup.ts'],
|
|
include: ['src/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
|
exclude: ['node_modules', 'dist'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/**/*.{js,ts,vue}'],
|
|
exclude: [
|
|
'node_modules',
|
|
'src/**/*.d.ts',
|
|
'src/**/*.spec.ts',
|
|
'src/**/*.test.ts',
|
|
'src/main.ts'
|
|
],
|
|
thresholds: {
|
|
global: {
|
|
statements: 80,
|
|
branches: 80,
|
|
functions: 80,
|
|
lines: 80
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|