@@ -186,6 +186,44 @@ func TestCustomAgentConfig_JSONIncludesReasoningEffort(t *testing.T) {
186186 }
187187}
188188
189+ func TestCustomAgentConfig_JSONIncludesLargeOutput (t * testing.T ) {
190+ enabled := false
191+ maxSizeBytes := int64 (2048 )
192+ cfg := CustomAgentConfig {
193+ Name : "large-output-agent" ,
194+ Prompt : "Handle large outputs." ,
195+ LargeOutput : & LargeToolOutputConfig {
196+ Enabled : & enabled ,
197+ MaxSizeBytes : & maxSizeBytes ,
198+ OutputDirectory : "/tmp/agent-large-output" ,
199+ },
200+ }
201+
202+ data , err := json .Marshal (cfg )
203+ if err != nil {
204+ t .Fatalf ("failed to marshal CustomAgentConfig: %v" , err )
205+ }
206+
207+ var decoded map [string ]any
208+ if err := json .Unmarshal (data , & decoded ); err != nil {
209+ t .Fatalf ("failed to unmarshal CustomAgentConfig: %v" , err )
210+ }
211+
212+ largeOutput , ok := decoded ["largeOutput" ].(map [string ]any )
213+ if ! ok {
214+ t .Fatalf ("expected largeOutput object, got %v" , decoded ["largeOutput" ])
215+ }
216+ if largeOutput ["enabled" ] != false {
217+ t .Errorf ("expected enabled false, got %v" , largeOutput ["enabled" ])
218+ }
219+ if largeOutput ["maxSizeBytes" ] != float64 (2048 ) {
220+ t .Errorf ("expected maxSizeBytes 2048, got %v" , largeOutput ["maxSizeBytes" ])
221+ }
222+ if largeOutput ["outputDir" ] != "/tmp/agent-large-output" {
223+ t .Errorf ("expected outputDir '/tmp/agent-large-output', got %v" , largeOutput ["outputDir" ])
224+ }
225+ }
226+
189227func TestCustomAgentConfig_JSONIncludesEmptyTools (t * testing.T ) {
190228 cfg := CustomAgentConfig {
191229 Name : "no-tools-agent" ,
0 commit comments