config

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package config parses and publishes immutable deepseek-vision configuration snapshots. The host owns enabled/priority, model routing, credentials, provider transport, and retry policy.

Index

Constants

View Source
const (
	DefaultVisionModel               = "gpt-5.6-luna"
	DefaultLanguage                  = "zh"
	DefaultRequestTimeoutSec         = 120
	DefaultEmergencyMaxImages        = 256
	DefaultMaxInflightVisionRequests = 4
	DefaultMaxRequestBytes           = 20 * 1024 * 1024
	DefaultMaxImageRefBytes          = 15 * 1024 * 1024
	DefaultMaxResponseBytes          = 4 * 1024 * 1024
	DefaultMaxResultChars            = 20_000
	DefaultAnalysisCacheSize         = 128
	DefaultAnalysisCacheTTL          = 15 * 60
	DefaultURLCacheTTL               = 2 * 60
	// MaxRequestBytesLimit is the largest raw Responses body accepted by
	// configuration. The native ABI separately accounts for envelope overhead.
	MaxRequestBytesLimit = 32 * 1024 * 1024
)

Variables

This section is empty.

Functions

func ConfigureYAML

func ConfigureYAML(raw []byte) error

func PublishValidated

func PublishValidated(cfg *Config) error

func Shutdown

func Shutdown()

Types

type Config

type Config struct {
	TargetModels                 []string
	VisionModel                  string
	VisionFallbackModels         []string
	Language                     string
	RequestTimeout               time.Duration
	EmergencyMaxImagesPerRequest int
	MaxInflightVisionRequests    int
	MaxRequestBytes              int
	MaxImageReferenceBytes       int
	MaxResponseBytes             int
	MaxResultChars               int
	AnalysisCacheSize            int
	AnalysisCacheTTL             time.Duration
	URLAnalysisCacheTTL          time.Duration
	AgentReanalysisEnabled       bool
	TraceEnabled                 bool
}

Config is an immutable, validated runtime snapshot. Callers must treat TargetModels as read-only.

func Default

func Default() *Config

func ParseYAML

func ParseYAML(raw []byte) (*Config, error)

ParseYAML accepts either the direct plugin mapping or the full plugins.configs.deepseek-vision host wrapper.

func Snapshot

func Snapshot() *Config

func (*Config) VisionModels added in v0.3.0

func (c *Config) VisionModels() []string

VisionModels returns the ordered primary-plus-fallback model chain.

Jump to

Keyboard shortcuts

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