Detect attempts to detect a provider from environment variables and create it.
If apiKey is provided, it uses that instead of environment detection.
If model is provided, it overrides the default model.
Returns the provider or an error if none can be detected.
type Info struct {
// Name is the provider identifier (e.g., "openai", "anthropic", "gemini"). Name string// APIKey is the API key for the provider. APIKey string// Model is the default model to use if none is specified. Model string
}