MCPcopy Index your code
hub / github.com/coder/coder / computeProviderHash

Function computeProviderHash

coderd/ai_providers_migrate.go:286–292  ·  view source on GitHub ↗
(c canonicalAIProvider)

Source from the content-addressed store, hash-verified

284}
285
286func computeProviderHash(c canonicalAIProvider) string {
287 // json.Marshal is deterministic for structs because field order is
288 // fixed by the struct definition.
289 b, _ := json.Marshal(c)
290 sum := sha256.Sum256(b)
291 return hex.EncodeToString(sum[:])
292}
293
294// providersFromEnv normalizes the deployment-values AI Bridge config
295// (legacy single-provider env vars and indexed CODER_AIBRIDGE_PROVIDER_<N>_*

Callers 2

SeedAIProvidersFromEnvFunction · 0.85
providersFromEnvFunction · 0.85

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected