CreateAIProviderRequest is the payload for creating a new AI provider. Name and Type are required. APIKeys carries the plaintext keys for OpenAI/Anthropic providers; Bedrock and Copilot providers must omit APIKeys (Bedrock authenticates via Settings, Copilot via request-time GitHub OAuth tokens).
| 192 | // must omit APIKeys (Bedrock authenticates via Settings, Copilot via |
| 193 | // request-time GitHub OAuth tokens). |
| 194 | type CreateAIProviderRequest struct { |
| 195 | Type AIProviderType `json:"type"` |
| 196 | Name string `json:"name"` |
| 197 | DisplayName string `json:"display_name,omitempty"` |
| 198 | Enabled bool `json:"enabled"` |
| 199 | BaseURL string `json:"base_url"` |
| 200 | APIKeys []string `json:"api_keys,omitempty"` |
| 201 | Settings AIProviderSettings `json:"settings,omitzero"` |
| 202 | } |
| 203 | |
| 204 | // Validate returns the field-level validation errors for a create |
| 205 | // request. An empty slice indicates the request is valid. |
nothing calls this directly
no outgoing calls
no test coverage detected