From 0e64efed7e89a6249b971ff41d9e722b9644a75b Mon Sep 17 00:00:00 2001 From: heaven Date: Tue, 4 Aug 2026 01:49:27 +0300 Subject: [PATCH] Let the live conformance probe opt into raw body logging through the same tmctl switch so reasoning_content is assertable on the wire --- backend/internal/pipeline/live_conformance_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/internal/pipeline/live_conformance_test.go b/backend/internal/pipeline/live_conformance_test.go index d98f87d2..de811636 100644 --- a/backend/internal/pipeline/live_conformance_test.go +++ b/backend/internal/pipeline/live_conformance_test.go @@ -75,7 +75,15 @@ func TestLiveAdapterConformance(t *testing.T) { if err != nil { t.Fatalf("build client: %v", err) } - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + // The raw-wire channel is opt-in through the SAME switch tmctl uses (main.go: LOG_LLM_BODIES=1 + // plus LOG_LEVEL=debug); without it nothing about this run changes. It exists here because + // the neutral LLMResponse carries no thinking field at all, and every provider we probe + // accounts reasoning as a SUBSET of completion_tokens — so "the model actually thought" + // cannot be asserted from usage, only from reasoning_content on the raw body (quirks 00 §9). + ctx, cancel := context.WithTimeout(obs.WithReqInfo(context.Background(), obs.ReqInfo{ + TraceID: obs.NewTraceID(), + LogBodies: os.Getenv("LOG_LLM_BODIES") == "1", + }), 5*time.Minute) defer cancel() resp, err := client.Complete(ctx, llm.LLMRequest{