🐛 fix(grok): 为 Grok 4.6 广告 xhigh 推理档位

Grok Build 的 /v1/models 原先给所有可配 reasoning 的 Grok 模型写死三档,
导致 grok-4.6 无法在 /model 里选出官方支持的 xhigh。转发与 Codex catalog
已按模型判断,现与同一条件对齐。
This commit is contained in:
kk
2026-08-27 15:50:20 +08:00
parent efb46db0a9
commit 00efee4303
4 changed files with 43 additions and 12 deletions
+5 -1
View File
@@ -1307,11 +1307,15 @@ func writeGrokModelsList(c *gin.Context, modelIDs []string) {
if grokModelSupportsConfigurableReasoning(modelID) {
item.SupportsReasoningEffort = true
item.ReasoningEffort = "high"
item.ReasoningEfforts = []grokReasoningEffortOption{
efforts := []grokReasoningEffortOption{
{Value: "low", Label: "Low"},
{Value: "medium", Label: "Medium"},
{Value: "high", Label: "High", Default: true},
}
if service.GrokSupportsXHighReasoningEffort(modelID) {
efforts = append(efforts, grokReasoningEffortOption{Value: "xhigh", Label: "xHigh"})
}
item.ReasoningEfforts = efforts
}
models = append(models, item)
}