MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / IsSpecAvailable

Method IsSpecAvailable

utils/spec_store.go:72–81  ·  view source on GitHub ↗

IsSpecAvailable reports whether a concrete spec is available. Availability fails open when the API did not provide availability data.

(gpuType string, gpuCount int)

Source from the content-addressed store, hash-verified

70// IsSpecAvailable reports whether a concrete spec is available. Availability
71// fails open when the API did not provide availability data.
72func (s *SpecStore) IsSpecAvailable(gpuType string, gpuCount int) bool {
73 if s == nil || len(s.availability) == 0 {
74 return true
75 }
76 status, ok := s.availability[publicConfigKey(gpuType, gpuCount)]
77 if !ok {
78 return true
79 }
80 return status == "available"
81}
82
83// gpuDisplayOrder defines the canonical display ordering for GPU types
84// (ascending by cost/performance).

Callers 10

IsGPUTypeAvailableMethod · 0.95
trySkipModifyComputeMethod · 0.80
handleEnterMethod · 0.80
renderComputeStepMethod · 0.80
trySkipComputeMethod · 0.80
initStepMethod · 0.80
handleEnterMethod · 0.80
ViewMethod · 0.80
validateCreateConfigFunction · 0.80

Calls 1

publicConfigKeyFunction · 0.85

Tested by

no test coverage detected