Added a configurable timeout knob

This commit is contained in:
2026-05-04 22:38:20 -05:00
parent ea05945457
commit c5ce270090
15 changed files with 215 additions and 34 deletions

View File

@@ -61,7 +61,7 @@ func TestHandlerPostRunsSuccess(t *testing.T) {
"transcript": {"type": "file", "uri": "./t.md"}
},
"vars": {"k": "v"},
"model": {"model": "gpt-x"}
"model": {"model": "gpt-x", "timeout_seconds": 120}
}`)
req := httptest.NewRequest(http.MethodPost, "/v1/runs", bytes.NewReader(body))
w := httptest.NewRecorder()
@@ -91,6 +91,9 @@ func TestHandlerPostRunsSuccess(t *testing.T) {
if r.last.Model == nil || r.last.Model.Model != "gpt-x" {
t.Fatalf("expected model override, got %#v", r.last.Model)
}
if r.last.Model.TimeoutSeconds != 120 {
t.Fatalf("expected timeout_seconds override 120, got %#v", r.last.Model)
}
}
func TestHandlerInvalidJSON(t *testing.T) {