disabledProviderFromRow builds a Provider stub for a disabled row. Using provider.DisabledStub rather than a concrete provider avoids duplicating the row.Type switch and ensures that a new AiProviderType value is automatically handled without requiring a matching case here.
(row database.AIProvider)
| 309 | // duplicating the row.Type switch and ensures that a new AiProviderType |
| 310 | // value is automatically handled without requiring a matching case here. |
| 311 | func disabledProviderFromRow(row database.AIProvider) (aibridge.Provider, error) { |
| 312 | return aibridge.NewDisabledProviderStub(row.Name, string(row.Type)), nil |
| 313 | } |
| 314 | |
| 315 | // buildAIProviderKeyPool builds a [keypool.Pool]. Callers must check |
| 316 | // len(keys) > 0 first; keypool.New rejects empty input. |
no test coverage detected