@@ -136,25 +136,25 @@ type SecretView struct {
136136// masked, plus the listeners that are actually in effect and the fields whose
137137// change needs a restart.
138138type ConfigView struct {
139- Listen string `json:"listen"`
140- ServerKeys []SecretView `json:"server_keys"`
141- ZenKeys []SecretView `json:"zen_keys"`
142- GoKeys []SecretView `json:"go_keys"`
143- Anonymous bool `json:"anonymous"`
144- Warp config.WarpConfig `json:"warp"`
139+ Listen string `json:"listen"`
140+ ServerKeys []SecretView `json:"server_keys"`
141+ ZenKeys []SecretView `json:"zen_keys"`
142+ GoKeys []SecretView `json:"go_keys"`
143+ Anonymous bool `json:"anonymous"`
144+ Warp config.WarpConfig `json:"warp"`
145145 Proxies []SecretView `json:"proxies"`
146146 ProxyFile string `json:"proxyfile"`
147147 ProxyBindings map [string ]string `json:"proxy_bindings,omitempty"`
148148 Upstream config.UpstreamConfig `json:"upstream"`
149- Retry config.RetryConfig `json:"retry"`
150- Models config.ModelsConfig `json:"models"`
151- Performance config.PerformanceConfig `json:"performance"`
152- Logging config.LoggingConfig `json:"logging"`
153- Prefer config.Tier `json:"prefer"`
154- Reasoning config.ReasoningConfig `json:"reasoning"`
155- WebUI WebUIView `json:"webui"`
156- Effective EffectiveView `json:"effective"`
157- Restart []string `json:"restart_required_fields,omitempty"`
149+ Retry config.RetryConfig `json:"retry"`
150+ Models config.ModelsConfig `json:"models"`
151+ Performance config.PerformanceConfig `json:"performance"`
152+ Logging config.LoggingConfig `json:"logging"`
153+ Prefer config.Tier `json:"prefer"`
154+ Reasoning config.ReasoningConfig `json:"reasoning"`
155+ WebUI WebUIView `json:"webui"`
156+ Effective EffectiveView `json:"effective"`
157+ Restart []string `json:"restart_required_fields,omitempty"`
158158}
159159
160160// EffectiveView is the set of listeners the running process actually bound,
@@ -185,21 +185,21 @@ type SecretInput struct {
185185// value or the ID of the existing one. The WebUI username and password are
186186// not changed here; they go through /api/account.
187187type ConfigUpdate struct {
188- Listen string `json:"listen"`
189- ServerKeys []SecretInput `json:"server_keys"`
190- ZenKeys []SecretInput `json:"zen_keys"`
191- GoKeys []SecretInput `json:"go_keys"`
192- Anonymous bool `json:"anonymous"`
193- Warp config.WarpConfig `json:"warp"`
188+ Listen string `json:"listen"`
189+ ServerKeys []SecretInput `json:"server_keys"`
190+ ZenKeys []SecretInput `json:"zen_keys"`
191+ GoKeys []SecretInput `json:"go_keys"`
192+ Anonymous bool `json:"anonymous"`
193+ Warp config.WarpConfig `json:"warp"`
194194 Proxies []SecretInput `json:"proxies"`
195195 ProxyFile string `json:"proxyfile"`
196196 ProxyBindings map [string ]string `json:"proxy_bindings,omitempty"`
197197 Upstream config.UpstreamConfig `json:"upstream"`
198- Retry config.RetryConfig `json:"retry"`
199- Models config.ModelsConfig `json:"models"`
200- Performance config.PerformanceConfig `json:"performance"`
201- Logging config.LoggingConfig `json:"logging"`
202- Prefer config.Tier `json:"prefer"`
198+ Retry config.RetryConfig `json:"retry"`
199+ Models config.ModelsConfig `json:"models"`
200+ Performance config.PerformanceConfig `json:"performance"`
201+ Logging config.LoggingConfig `json:"logging"`
202+ Prefer config.Tier `json:"prefer"`
203203 // A pointer distinguishes an omitted field (legacy clients should keep the
204204 // current reasoning configuration) from an explicit empty object (clear it).
205205 Reasoning * config.ReasoningConfig `json:"reasoning,omitempty"`
@@ -255,8 +255,8 @@ func (a *Server) handlePutConfig(w http.ResponseWriter, r *http.Request) {
255255 ServerKeyMetadata : current .ServerKeyMetadata ,
256256 Rotation : current .Rotation ,
257257 Listen : update .Listen , ServerKeys : serverKeys , ZenKeys : zenKeys , GoKeys : goKeys , Anonymous : update .Anonymous , Warp : update .Warp , Proxies : proxies , ProxyFile : update .ProxyFile ,
258- ProxyBindings : proxyBindings ,
259- Upstream : update .Upstream , Retry : update .Retry , Models : update .Models , Performance : update .Performance , Logging : update .Logging , Prefer : update .Prefer ,
258+ ProxyBindings : proxyBindings ,
259+ Upstream : update .Upstream , Retry : update .Retry , Models : update .Models , Performance : update .Performance , Logging : update .Logging , Prefer : update .Prefer ,
260260 Reasoning : reasoning ,
261261 WebUI : config.WebUIConfig {Enabled : update .WebUI .Enabled , Listen : update .WebUI .Listen , Username : current .WebUI .Username , PasswordHash : current .WebUI .PasswordHash , SessionTTLMinutes : update .WebUI .SessionTTLMinutes },
262262 }
0 commit comments