Skip to content

Commit 754a24c

Browse files
committed
Align sdk agent validation test with structured_output rules
1 parent 24aacee commit 754a24c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sdk/src/__tests__/validate-agents.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,14 @@ describe('validateAgents', () => {
299299
expect(result.errorCount).toBeGreaterThan(0)
300300
})
301301

302-
it('should reject structured_output without set_output tool', async () => {
302+
it('allows structured_output without set_output tool (LLM handles output)', async () => {
303303
const agents: AgentDefinition[] = [
304304
{
305305
id: 'missing-set-output',
306306
displayName: 'Missing Set Output Tool',
307307
model: 'anthropic/claude-sonnet-4',
308308
outputMode: 'structured_output',
309-
toolNames: ['read_files'], // Missing set_output
309+
toolNames: ['read_files'], // Missing set_output is allowed
310310
outputSchema: {
311311
type: 'object',
312312
properties: {
@@ -319,8 +319,7 @@ describe('validateAgents', () => {
319319

320320
const result = await validateAgents(agents)
321321

322-
expect(result.success).toBe(false)
323-
expect(result.errorCount).toBeGreaterThan(0)
322+
expect(result.success).toBe(true)
324323
})
325324

326325
it('should reject spawnableAgents without spawn_agents tool', async () => {

0 commit comments

Comments
 (0)