.branch() output mismatches the return type
When we use
.branch method for running either StepA or StepB, it executes the step based on condition, which lets assume is running StepA. Now the output is like below:
but return type says it will return both in some form based on execution. What it does is, I have force type my input schema for the step after the .branch method by putting an extra .map between them which is unnecessary. It should return the right type back.
See attached chatGPT conversation that confirms that when return type was passed and asked if there is a mismatch
3 Replies

š Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10642
š If you're experiencing an error, please provide a minimal reproducible example whenever possible to help us resolve it quickly.
š Thank you for helping us improve Mastra!
Thanks for reporting this @Jenil we'll take a look