diff --git a/internal/registry/model_definitions.go b/internal/registry/model_definitions.go index 1c51e898..ed4d1c21 100644 --- a/internal/registry/model_definitions.go +++ b/internal/registry/model_definitions.go @@ -781,3 +781,29 @@ func GetAntigravityModelConfig() map[string]*AntigravityModelConfig { "gemini-claude-opus-4-5-thinking": {Thinking: &ThinkingSupport{Min: 1024, Max: 200000, ZeroAllowed: false, DynamicAllowed: true}, MaxCompletionTokens: 64000}, } } + +// LookupStaticModelInfo searches all static model definitions for a model by ID. +// Returns nil if no matching model is found. +func LookupStaticModelInfo(modelID string) *ModelInfo { + if modelID == "" { + return nil + } + allModels := [][]*ModelInfo{ + GetClaudeModels(), + GetGeminiModels(), + GetGeminiVertexModels(), + GetGeminiCLIModels(), + GetAIStudioModels(), + GetOpenAIModels(), + GetQwenModels(), + GetIFlowModels(), + } + for _, models := range allModels { + for _, m := range models { + if m != nil && m.ID == modelID { + return m + } + } + } + return nil +} diff --git a/sdk/cliproxy/service.go b/sdk/cliproxy/service.go index 043eedb7..21690f8e 100644 --- a/sdk/cliproxy/service.go +++ b/sdk/cliproxy/service.go @@ -1150,14 +1150,20 @@ func buildConfigModels[T modelEntry](models []T, ownedBy, modelType string) []*M if display == "" { display = alias } - out = append(out, &ModelInfo{ + info := &ModelInfo{ ID: alias, Object: "model", Created: now, OwnedBy: ownedBy, Type: modelType, DisplayName: display, - }) + } + if name != "" { + if upstream := registry.LookupStaticModelInfo(name); upstream != nil && upstream.Thinking != nil { + info.Thinking = upstream.Thinking + } + } + out = append(out, info) } return out }