- 渠道模型映射:支持精确匹配和通配符映射,按平台隔离 - 渠道模型定价:支持 token/按次/图片三种计费模式,区间分层定价 - 模型限制:渠道可限制仅允许定价列表中的模型 - 计费模型来源:支持 requested/upstream 两种计费模型选择 - 用量统计:usage_logs 新增 channel_id/model_mapping_chain/billing_tier/billing_mode 字段 - Dashboard 支持 model_source 维度(requested/upstream/mapping)查看模型统计 - 全部 gateway handler 统一接入 ResolveChannelMappingAndRestrict - 修复测试:同步 SoraGenerationRepository 接口、SQL INSERT 参数、scan 字段
16 lines
469 B
Go
16 lines
469 B
Go
//go:build unit
|
|
|
|
package service
|
|
|
|
// testPtrFloat64 returns a pointer to the given float64 value.
|
|
func testPtrFloat64(v float64) *float64 { return &v }
|
|
|
|
// testPtrInt returns a pointer to the given int value.
|
|
func testPtrInt(v int) *int { return &v }
|
|
|
|
// testPtrString returns a pointer to the given string value.
|
|
func testPtrString(v string) *string { return &v }
|
|
|
|
// testPtrBool returns a pointer to the given bool value.
|
|
func testPtrBool(v bool) *bool { return &v }
|