(t *testing.T)
| 561 | } |
| 562 | |
| 563 | func TestInfer_InvalidMaxTokens400(t *testing.T) { |
| 564 | srv := New(testConfig(100, true)) |
| 565 | ts := httptest.NewServer(srv.Routes()) |
| 566 | defer ts.Close() |
| 567 | |
| 568 | status, body := postInfer(t, ts.URL, map[string]any{ |
| 569 | "tenant_id": "team-a", |
| 570 | "task_type": "simple", |
| 571 | "input": map[string]any{ |
| 572 | "text": "hello", |
| 573 | }, |
| 574 | "options": map[string]any{ |
| 575 | "stream": false, |
| 576 | "max_tokens": 0, |
| 577 | }, |
| 578 | }) |
| 579 | |
| 580 | if status != http.StatusBadRequest { |
| 581 | t.Fatalf("expected 400, got %d", status) |
| 582 | } |
| 583 | assertStructuredError(t, body, errCodeInvalidOptions) |
| 584 | } |
| 585 | |
| 586 | func TestHTTPLayerTimeouts_Overrides(t *testing.T) { |
| 587 | cfg := testConfig(100, true) |
nothing calls this directly
no test coverage detected