backend

package
v0.0.0-...-bcaad4a Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidID

func ValidID(id string) bool

Types

type AccountUsage

type AccountUsage struct {
	Windows           []UsageWindow
	MonthlyUsageUSD   *float64
	LimitRemainingUSD *float64
}

type Authenticator

type Authenticator interface {
	Logout(context.Context) error
}

type BrowserAuthenticator

type BrowserAuthenticator interface {
	LoginBrowser(context.Context, func(string) error) error
}

type CredentialChecker

type CredentialChecker interface {
	CheckCredentials(context.Context) error
}

type Descriptor

type Descriptor struct {
	ID            string
	Name          string
	DefaultModels ModelDefaults
}

type DeviceAuthenticator

type DeviceAuthenticator interface {
	LoginDevice(context.Context, func(DeviceCode) error) error
}

type DeviceCode

type DeviceCode struct {
	VerificationURL string
	UserCode        string
}

type Driver

type Driver interface {
	Descriptor() Descriptor
	Open(Options) (Runtime, error)
}

type ModelDefaults

type ModelDefaults struct {
	Main     string
	Fast     string
	Balanced string
}

type ModelInitializer

type ModelInitializer interface {
	InitializeModels(context.Context) error
}

type ModelMetadata

type ModelMetadata struct {
	ContextWindow  int64
	ThinkingLevels []agent.ThinkingLevel
	FastMode       bool
}

func (ModelMetadata) ClampThinkingLevel

func (metadata ModelMetadata) ClampThinkingLevel(level agent.ThinkingLevel) agent.ThinkingLevel

type ModelMetadataProvider

type ModelMetadataProvider interface {
	ModelMetadata(model string) ModelMetadata
}

type ModelNotSupportedError

type ModelNotSupportedError struct {
	Provider        string
	Model           string
	AvailableModels []string
}

func NewModelNotSupportedError

func NewModelNotSupportedError(provider, model string, availableModels []string) *ModelNotSupportedError

func (*ModelNotSupportedError) Error

func (err *ModelNotSupportedError) Error() string

type ModelValidator

type ModelValidator interface {
	ValidateModel(model string) error
}

type Options

type Options struct {
	// Home is the resolved absolute Eul application directory.
	Home string
}

type Registry

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

func NewRegistry

func NewRegistry(defaultID string, drivers ...Driver) (*Registry, error)

func (*Registry) Lookup

func (registry *Registry) Lookup(id string) (Driver, error)

type Runtime

type Runtime interface {
	NewProvider() (agent.Provider, error)
	Close() error
}

Runtime is a configured backend. NewProvider may be called concurrently and each returned provider remains valid until Close is called. Close is called after all providers created by the runtime are no longer in use.

type UsageProvider

type UsageProvider interface {
	Usage(context.Context) (AccountUsage, error)
}

type UsageWindow

type UsageWindow struct {
	Duration    time.Duration
	UsedPercent int
	ResetsAt    time.Time
}

Directories

Path Synopsis
anthropic
openai

Jump to

Keyboard shortcuts

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