From 142d8c3618155a7a1c000923a6603d3e2daf18c7 Mon Sep 17 00:00:00 2001 From: alfadb Date: Sat, 2 May 2026 09:23:16 +0800 Subject: [PATCH] fix(gateway): normalize DeepSeek reasoning_effort 'max' to 'xhigh' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pi maps defaultThinkingLevel 'xhigh' → 'max' for deepseek-v4-pro via thinkingLevelMap, but normalizeOpenAIReasoningEffort did not recognize 'max', causing all reasoning_effort to be dropped (0% fill rate since traffic switched from claude to deepseek on May 1). Add 'max' → 'xhigh' mapping to match Claude's NormalizeClaudeOutputEffort behavior. --- backend/internal/service/openai_gateway_service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/service/openai_gateway_service.go b/backend/internal/service/openai_gateway_service.go index d056668a48..1e9407bd12 100644 --- a/backend/internal/service/openai_gateway_service.go +++ b/backend/internal/service/openai_gateway_service.go @@ -7311,7 +7311,7 @@ func normalizeOpenAIReasoningEffort(raw string) string { return "" case "low", "medium", "high": return value - case "xhigh", "extrahigh": + case "xhigh", "extrahigh", "max": return "xhigh" default: // Only store known effort levels for now to keep UI consistent.