(c canonicalAIProvider)
| 284 | } |
| 285 | |
| 286 | func 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>_* |
no test coverage detected