Read the eval target model from the user settings scope
ci / vet-and-test (pull_request) Successful in 47s

Why: The live report's model field came back empty because the settings
endpoint nests models under the user scope ({defaults, project, schema, user}),
not at the top level; the before-baseline report had to be annotated by hand.

Evidence: SELF - vet with -tags live passes; the scope shape verified against
GET /api/settings on the qa instance.

Impact: Future live reports carry the served model without manual annotation.
This commit is contained in:
2026-10-09 13:04:08 +00:00
parent d88dcb999f
commit b68833f320
+9 -6
View File
@@ -192,15 +192,18 @@ func TestLiveSuite(t *testing.T) {
}
}
c := &client{base: base, http: &http.Client{Timeout: 120 * time.Second}, t: t}
// /api/settings 的形状是 {defaults, project, schema, user};模型播在 user 作用域。
var settings struct {
Models struct {
Chat struct {
Model string `json:"model"`
} `json:"chat"`
} `json:"models"`
User struct {
Models struct {
Chat struct {
Model string `json:"model"`
} `json:"chat"`
} `json:"models"`
} `json:"user"`
}
_ = c.do("GET", "/api/settings", nil, &settings)
c.model = settings.Models.Chat.Model
c.model = settings.User.Models.Chat.Model
proj := struct {
ID string `json:"id"`