Let the live conformance probe opt into raw body logging through the same tmctl switch so reasoning_content is assertable on the wire

This commit is contained in:
heaven 2026-08-04 01:49:27 +03:00
parent 5a81bffb12
commit 0e64efed7e

View file

@ -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{