config

package
v1.9.23 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultModels = map[string]string{
	"openai":    "gpt-5-mini",
	"anthropic": "claude-sonnet-4-0",
	"google":    "gemini-2.5-flash",
	"dmr":       "ai/qwen3:latest",
	"mistral":   "mistral-small-latest",
}

Functions

func ApplyModelOverrides added in v1.7.0

func ApplyModelOverrides(cfg *latest.Config, overrides []string) error

ApplyModelOverrides applies CLI model overrides to the configuration

func AutoEmbeddingModelConfigs added in v1.9.16

func AutoEmbeddingModelConfigs() []latest.ModelConfig

AutoEmbeddingModelConfigs returns the ordered list of embedding-capable models to try when a RAG strategy uses `model: auto` for embeddings.

The priority is:

  1. OpenAI -> text-embedding-3-small model
  2. DMR -> Google's embeddinggemma model (via Docker Model Runner)

func AutoModelConfig added in v1.9.14

func AutoModelConfig(ctx context.Context, modelsGateway string, env environment.Provider) latest.ModelConfig

func AvailableProviders added in v1.9.14

func AvailableProviders(ctx context.Context, modelsGateway string, env environment.Provider) []string

func CheckRequiredEnvVars added in v1.8.0

func CheckRequiredEnvVars(ctx context.Context, cfg *latest.Config, modelsGateway string, env environment.Provider) error

CheckRequiredEnvVars checks which environment variables are required by the models and tools.

This allows exiting early with a proper error message instead of failing later when trying to use a model or tool.

func GatherEnvVarsForModels added in v1.8.0

func GatherEnvVarsForModels(cfg *latest.Config) []string

func GatherEnvVarsForTools added in v1.8.0

func GatherEnvVarsForTools(ctx context.Context, cfg *latest.Config) ([]string, error)

func LoadConfig added in v1.6.4

func LoadConfig(ctx context.Context, path string, fs filesystem.FS) (*latest.Config, error)

func LoadConfigBytes added in v1.9.13

func LoadConfigBytes(ctx context.Context, data []byte) (*latest.Config, error)

func Parsers added in v1.9.22

func Parsers() map[string]func([]byte) (any, error)

func PreferredMaxTokens added in v1.9.14

func PreferredMaxTokens(provider string) int

func Upgrades added in v1.9.22

func Upgrades() []func(any) (any, error)

Types

type Config added in v1.9.22

type Config struct {
	EnvFiles       []string
	ModelsGateway  string
	GlobalCodeMode bool
	WorkingDir     string
}

type RuntimeConfig added in v1.0.5

type RuntimeConfig struct {
	Config

	EnvProviderForTests environment.Provider
	// contains filtered or unexported fields
}

func (*RuntimeConfig) Clone added in v1.9.22

func (runConfig *RuntimeConfig) Clone() *RuntimeConfig

func (*RuntimeConfig) EnvProvider added in v1.9.14

func (runConfig *RuntimeConfig) EnvProvider() environment.Provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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