providerregistry

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterClaudeAccounts

func RegisterClaudeAccounts(ctx context.Context, store claude.TokenStore) ([]llm.DetectedProvider, error)

Types

type BuildConfig

type BuildConfig struct {
	Name       string
	Type       string
	Params     map[string]any
	HTTPClient *http.Client
	LLMOptions []llm.Option
}

type Definition

type Definition struct {
	Type   string
	Detect func(context.Context, DetectEnv) ([]llm.DetectedProvider, error)
	Build  func(context.Context, BuildConfig) (llm.Provider, error)
}

type DetectEnv

type DetectEnv struct {
	HTTPClient *http.Client
	LLMOptions []llm.Option
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func New

func New() *Registry

func (*Registry) Build

func (r *Registry) Build(ctx context.Context, req llm.DetectedProvider, client *http.Client, opts []llm.Option) (llm.Provider, error)

func (*Registry) Definition

func (r *Registry) Definition(typeName string) (Definition, bool)

func (*Registry) Detect

func (r *Registry) Detect(ctx context.Context, env llm.DetectEnv, disabled map[string]bool) ([]llm.DetectedProvider, error)

func (*Registry) Register

func (r *Registry) Register(def Definition)

Jump to

Keyboard shortcuts

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