CustomProviderEntry constructor

CustomProviderEntry({
  1. required String name,
  2. required String apiType,
  3. required String baseUrl,
  4. required String modelId,
  5. String? keyName,
  6. CustomProviderAuthMethod authMethod = CustomProviderAuthMethod.apiKey,
  7. String? authHeader,
  8. Duration? connectTimeout,
  9. Duration? streamIdleTimeout,
  10. bool keyNotPersisted = false,
})

Creates an entry. keyName is the secure-store/env name holding the API key (null = keyless); modelId is the last-used model. authMethod selects the auth path for SSO/JWT providers. authHeader names the auth header (issue #964): x-api-key sends x-api-key: <key> instead of Authorization: Bearer <key>.

Implementation

CustomProviderEntry({
  required this.name,
  required this.apiType,
  required this.baseUrl,
  required this.modelId,
  this.keyName,
  this.authMethod = CustomProviderAuthMethod.apiKey,
  this.authHeader,
  this.connectTimeout,
  this.streamIdleTimeout,
  this.keyNotPersisted = false,
});