返回 DeepSeek-Reasonix
effort_legacy.go
根目录 / internal / config / effort_legacy.go
1 package config
2
3 import "reasonix/internal/provider/openai"
4
5 // migrateStoredDeepSeekEffort preserves the wire value of saved pre-contract
6 // aliases. New user selections still go through strict NormalizeEffort validation.
7 func migrateStoredDeepSeekEffort(e *ProviderEntry, effort string) string {
8 if (effort == "medium" || effort == "xhigh") && (ReasoningProtocolForEntry(e) == ReasoningProtocolDeepSeek || (explicitReasoningProtocol(e) == "" && openai.IsDeepSeek(e.BaseURL))) && (len(e.SupportedEfforts) == 0 || e.reasoningAutomatic) {
9 cap := ReasoningCapabilityForEntry(e)
10 if cap.Validate(e.Model, "high") == nil {
11 return "high"
12 }
13 }
14 return effort
15 }
16
16 lines GO