refactor: Simplify model mapping and pricing logic across relay modules

This commit is contained in:
1808837298@qq.com committed 2025-02-20 16:41:46 +08:00
1 parent 8dbac87e92
commit 1e0b414fc0
13 files changed
+279 -199

No files matched your search

+4
View File
@@ -16,6 +16,10 @@ func GenerateTextOtherInfo(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, m
if relayInfo.ReasoningEffort != "" {
other["reasoning_effort"] = relayInfo.ReasoningEffort
}
if relayInfo.IsModelMapped {
other["is_model_mapped"] = true
other["upstream_model_name"] = relayInfo.UpstreamModelName
}
adminInfo := make(map[string]interface{})
adminInfo["use_channel"] = ctx.GetStringSlice("use_channel")
other["admin_info"] = adminInfo