IsConfigured reports whether any load-bearing Bedrock field is set, indicating that the operator wants the provider to authenticate via AWS Bedrock rather than as a bearer-token Anthropic provider. Model and SmallFastModel are intentionally excluded: they have deployment-level defaults declared in
()
| 44 | // not required because Bedrock can also authenticate via the AWS |
| 45 | // environment (instance profile, AWS_PROFILE, IRSA, etc.). |
| 46 | func (b AIProviderBedrockSettings) IsConfigured() bool { |
| 47 | if b.Region != "" { |
| 48 | return true |
| 49 | } |
| 50 | if b.AccessKey != nil && *b.AccessKey != "" { |
| 51 | return true |
| 52 | } |
| 53 | if b.AccessKeySecret != nil && *b.AccessKeySecret != "" { |
| 54 | return true |
| 55 | } |
| 56 | return false |
| 57 | } |
| 58 | |
| 59 | // NewAIProviderBedrockSettings builds an AIProviderBedrockSettings, |
| 60 | // promoting non-empty credential strings to pointers so callers don't |
no outgoing calls
no test coverage detected