fix(thinking): use LookupModelInfo for model data

This commit is contained in:
hkfires
2026-01-14 23:02:27 +08:00
parent 6e4a602c60
commit ed8b0f25ee
9 changed files with 9 additions and 9 deletions

View File

@@ -67,7 +67,7 @@ func ConvertOpenAIRequestToClaude(modelName string, inputRawJSON []byte, stream
root := gjson.ParseBytes(rawJSON)
if v := root.Get("reasoning_effort"); v.Exists() {
modelInfo := registry.GetGlobalRegistry().GetModelInfo(modelName)
modelInfo := registry.LookupModelInfo(modelName)
if modelInfo != nil && modelInfo.Thinking != nil && len(modelInfo.Thinking.Levels) == 0 {
effort := strings.ToLower(strings.TrimSpace(v.String()))
if effort != "" {