config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config loads shim configuration from a .env file and the process environment. Zero external dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr        string
	Port            int
	Adapter         string
	UpstreamAPIKey  string
	UpstreamBaseURL string
	UpstreamModel   string // optional; catch-all for non-claude-* inputs
	// Per-role overrides — empty means "use adapter default for this role."
	// Claude Code sends claude-opus*/sonnet*/haiku* model names; the adapter
	// maps those to upstream-specific models. These env vars override the
	// adapter's per-role default.
	UpstreamOpusModel   string
	UpstreamSonnetModel string
	UpstreamHaikuModel  string
	LogLevel            string
	LogRedact           bool
	MaxRequestBytes     int64
}

Config holds runtime configuration. Fields are populated from the process environment, optionally pre-seeded from a .env file.

func Load

func Load(envPath string) (*Config, error)

Load reads a .env file (if present) into the process environment, then constructs a Config. Existing process env always wins over .env entries.

Jump to

Keyboard shortcuts

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