File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -226,15 +226,10 @@ export function validateSingleAgent(
226226 }
227227 }
228228 }
229- // Determine outputMode: default to 'json' if outputSchema is present, otherwise 'last_message'
230- const outputMode =
231- template . outputMode ?? ( template . outputSchema ? 'json' : 'last_message' )
232229
233230 // Convert to internal AgentTemplate format
234231 const agentTemplate : AgentTemplate = {
235232 ...template ,
236- displayName : template . displayName ,
237- outputMode,
238233 outputSchema,
239234 inputSchema,
240235 toolNames : template . toolNames as ToolName [ ] ,
Original file line number Diff line number Diff line change @@ -158,15 +158,15 @@ export const DynamicAgentTemplateSchema = DynamicAgentConfigSchema.extend({
158158} )
159159 . refine (
160160 ( data ) => {
161- // If outputSchema is provided, outputMode must be 'json' or undefined (will default to 'json')
162- if ( data . outputSchema && data . outputMode && data . outputMode !== 'json' ) {
161+ // If outputSchema is provided, outputMode must be explicitly set to 'json'
162+ if ( data . outputSchema && data . outputMode !== 'json' ) {
163163 return false
164164 }
165165 return true
166166 } ,
167167 {
168168 message :
169- "outputSchema can only be used with outputMode 'json'. Remove outputMode or set it to 'json'." ,
169+ "outputSchema requires outputMode to be explicitly set to 'json'." ,
170170 path : [ 'outputMode' ] ,
171171 } ,
172172 )
You can’t perform that action at this time.
0 commit comments