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

Struct CreateAIProviderRequest

codersdk/aiproviders.go:194–202  ·  view source on GitHub ↗

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).

Source from the content-addressed store, hash-verified

192// must omit APIKeys (Bedrock authenticates via Settings, Copilot via
193// request-time GitHub OAuth tokens).
194type 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected