Skip to content

Commit 4f347d8

Browse files
committed
Remove unused ModelSupportsReasoning function
Assisted-By: docker-agent
1 parent da45428 commit 4f347d8

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

pkg/modelsdev/store.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -330,35 +330,4 @@ func isBedrockRegionPrefix(prefix string) bool {
330330
return bedrockRegionPrefixes[prefix]
331331
}
332332

333-
// ModelSupportsReasoning checks if the given model ID supports reasoning/thinking.
334-
//
335-
// This function implements fail-open semantics:
336-
// - If modelID is empty or not in "provider/model" format, returns true (fail-open)
337-
// - If models.dev lookup fails for any reason, returns true (fail-open)
338-
// - If lookup succeeds, returns the model's Reasoning field value
339-
func ModelSupportsReasoning(ctx context.Context, modelID string) bool {
340-
// Fail-open for empty model ID
341-
if modelID == "" {
342-
return true
343-
}
344-
345-
// Fail-open if not in provider/model format
346-
if !strings.Contains(modelID, "/") {
347-
slog.Debug("Model ID not in provider/model format, assuming reasoning supported to allow user choice", "model_id", modelID)
348-
return true
349-
}
350333

351-
store, err := NewStore()
352-
if err != nil {
353-
slog.Debug("Failed to create modelsdev store, assuming reasoning supported to allow user choice", "error", err)
354-
return true
355-
}
356-
357-
model, err := store.GetModel(ctx, modelID)
358-
if err != nil {
359-
slog.Debug("Failed to lookup model in models.dev, assuming reasoning supported to allow user choice", "model_id", modelID, "error", err)
360-
return true
361-
}
362-
363-
return model.Reasoning
364-
}

0 commit comments

Comments
 (0)