()
| 243 | } |
| 244 | |
| 245 | func (d desiredAIProvider) canonical() canonicalAIProvider { |
| 246 | c := canonicalAIProvider{ |
| 247 | Type: string(d.Type), |
| 248 | BaseURL: d.BaseURL, |
| 249 | } |
| 250 | if d.Bedrock != nil { |
| 251 | c.BedrockRegion = d.Bedrock.Region |
| 252 | } |
| 253 | c.KeysHash = computeKeysHash(d.Keys, d.Bedrock) |
| 254 | return c |
| 255 | } |
| 256 | |
| 257 | // computeKeysHash produces a deterministic hash over the bearer API |
| 258 | // keys and, for Bedrock providers, the access key and secret. |
no test coverage detected