feat: LuaJIT worker-pool VM, multimodal/disable-thinking passthrough, WebUI redesign, DeepSeek V4

This commit is contained in:
root
2026-08-07 13:34:16 +08:00
parent a0e6e6da90
commit ccbcede581
16 changed files with 1733 additions and 425 deletions

View File

@ -22,30 +22,30 @@ type Config struct {
}
// Model is a single exposed model id bound to a source, with priority used by
// AUTO model selection (higher number = preferred).
// AUTO auto selection (higher number = preferred).
type Model struct {
ID string `yaml:"id"`
Priority int `yaml:"priority"`
Kind string `yaml:"kind"` // "chat" (default) | "image"
Meta map[string]interface{} `yaml:"meta"`
ID string `yaml:"id" json:"id"`
Priority int `yaml:"priority" json:"priority"`
Kind string `yaml:"kind" json:"kind"` // "chat" (default) | "image"
Meta map[string]interface{} `yaml:"meta" json:"meta,omitempty"`
}
// Source describes a single upstream LLM provider.
type Source struct {
Name string `yaml:"name"`
BaseURL string `yaml:"base_url"`
APIKey string `yaml:"api_key"`
Adapter string `yaml:"adapter"`
Endpoint string `yaml:"endpoint"` // chat endpoint override
ImageEndpoint string `yaml:"image_endpoint"` // image endpoint override
Models []Model `yaml:"models"`
Headers map[string]string `yaml:"headers"`
Meta map[string]interface{} `yaml:"meta"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
Timeout time.Duration `yaml:"timeout"`
MaxConcurrent int `yaml:"max_concurrent"` // per-source inflight cap
QueueTimeout time.Duration `yaml:"queue_timeout"` // wait for slot before failing
Name string `yaml:"name" json:"name"`
BaseURL string `yaml:"base_url" json:"base_url"`
APIKey string `yaml:"api_key" json:"api_key"`
Adapter string `yaml:"adapter" json:"adapter"`
Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` // chat endpoint override
ImageEndpoint string `yaml:"image_endpoint" json:"image_endpoint,omitempty"` // image endpoint override
Models []Model `yaml:"models" json:"models"`
Headers map[string]string `yaml:"headers" json:"headers,omitempty"`
Meta map[string]interface{} `yaml:"meta" json:"meta,omitempty"`
Temperature float64 `yaml:"temperature" json:"temperature,omitempty"`
MaxTokens int `yaml:"max_tokens" json:"max_tokens,omitempty"`
Timeout time.Duration `yaml:"timeout" json:"-"`
MaxConcurrent int `yaml:"max_concurrent" json:"max_concurrent"`
QueueTimeout time.Duration `yaml:"queue_timeout" json:"-"`
}
// Load reads and validates a config file.
@ -121,4 +121,4 @@ func (c *Config) ApplyDefaults() error {
// RuntimeConfig is the persisted web-UI editable slice (sources added/edited).
type RuntimeConfig struct {
Sources []Source `json:"sources"`
}
}