provider

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package provider provides internal provider detection and initialization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(apiKey, model string) (providers.Provider, error)

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 and may determine the provider. Returns the provider or an error if none can be detected.

Types

type Info

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
}

Info contains detected provider information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL