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

Function redactAIProviderSettings

coderd/database/db2sdk/db2sdk.go:108–118  ·  view source on GitHub ↗

redactAIProviderSettings strips write-only fields from a settings value so it can be safely echoed back in API responses.

(s codersdk.AIProviderSettings)

Source from the content-addressed store, hash-verified

106// redactAIProviderSettings strips write-only fields from a settings
107// value so it can be safely echoed back in API responses.
108func redactAIProviderSettings(s codersdk.AIProviderSettings) codersdk.AIProviderSettings {
109 out := s
110 if out.Bedrock != nil {
111 // Deep-copy so we don't mutate the caller's struct.
112 b := *out.Bedrock
113 b.AccessKey = nil
114 b.AccessKeySecret = nil
115 out.Bedrock = &b
116 }
117 return out
118}
119
120type ExternalAuthMeta struct {
121 Authenticated bool

Callers 1

AIProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected