@@ -129,12 +129,9 @@ ROUTING RULES:
1291293. If the context is even partially related to a route's description, select that route
1301304. ONLY output NO_MATCH if the context is completely unrelated to ALL route descriptions
131131
132- OUTPUT FORMAT:
133- - Output EXACTLY one route ID (copied exactly as shown above) OR "NO_MATCH"
134- - No explanation, no punctuation, no additional text
135- - Just the route ID or NO_MATCH
136-
137- Your response:`
132+ Respond with a JSON object containing:
133+ - route: EXACTLY one route ID (copied exactly as shown above) OR "NO_MATCH"
134+ - reasoning: A brief explanation (1-2 sentences) of why you chose this route`
138135}
139136
140137/**
@@ -272,6 +269,7 @@ interface RouterV2Response extends ToolResponse {
272269 total : number
273270 }
274271 selectedRoute : string
272+ reasoning : string
275273 selectedPath : {
276274 blockId : string
277275 blockType : string
@@ -355,6 +353,7 @@ export const RouterV2Block: BlockConfig<RouterV2Response> = {
355353 tokens : { type : 'json' , description : 'Token usage' } ,
356354 cost : { type : 'json' , description : 'Cost information' } ,
357355 selectedRoute : { type : 'string' , description : 'Selected route ID' } ,
356+ reasoning : { type : 'string' , description : 'Explanation of why this route was chosen' } ,
358357 selectedPath : { type : 'json' , description : 'Selected routing path' } ,
359358 } ,
360359}
0 commit comments