feat: add userAgent config for ModelConfig (#2242)

* feat: add userAgent config for ModelConfig

* update docs for ModelConfig.userAgent

* make defaut userAgent to PicoClaw and add test case
This commit is contained in:
Cytown
2026-04-02 11:44:13 +08:00
committed by GitHub
parent 415abc8cd4
commit 2c446e1e07
15 changed files with 286 additions and 29 deletions
+2
View File
@@ -600,6 +600,8 @@ type ModelConfig struct {
// existing configs, the field is inferred during load: models with API keys
// or the reserved "local-model" name are auto-enabled.
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
// UserAgent is the user agent string to use for HTTP requests.
UserAgent string `json:"user_agent,omitempty" yaml:"-"`
// isVirtual marks this model as a virtual model generated from multi-key expansion.
// Virtual models should not be persisted to config files.