MCPcopy Create free account
hub / github.com/codehamr/codehamr / FromHeaders

Function FromHeaders

internal/cloud/cloud.go:68–87  ·  view source on GitHub ↗

FromHeaders reads the budget header. Missing (e.g. local Ollama) yields the zero value and the UI skips the segment. Out-of-range values are clamped, not rejected, so server-side rounding past 1.0 doesn't blank the readout. NaN/±Inf are rejected: NaN slips past the clamp (all comparisons false), an

(h http.Header)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 5

ProbeMethod · 0.92
runMethod · 0.92
TestFromHeadersMissingFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestFromHeadersMissingFunction · 0.68