package agent import ( "testing" "time" "chat-agent-system/internal/config" ) func TestRunnerPayload_ReasoningDoesNotBecomeWorkspace(t *testing.T) { p := &PiAgentBackend{cfg: &config.Config{PiAgentModel: "MiniMax-M3", PiAgentProvider: "minimax"}} body := p.runnerPayload(Request{ Prompt: "summarize", Targets: []string{"shadow.md"}, ToolProfile: ToolProfileReasoning, }, "/tmp/ws", true, time.Second) if body["tool_profile"] != ToolProfileReasoning { t.Fatalf("tool_profile = %v", body["tool_profile"]) } if body["typed_result"] != true { t.Fatal("remote payload must keep typed_result") } local := p.runnerPayload(Request{Targets: []string{"output.md"}}, "/tmp/ws", false, 0) if local["tool_profile"] != ToolProfileWorkspace { t.Fatalf("empty profile = %v", local["tool_profile"]) } if _, ok := local["typed_result"]; ok { t.Fatal("local bridge payload must not switch to typed_result") } }