Skip to content

Variable: MastraFeedbackRequestSchema

const MastraFeedbackRequestSchema: ZodObject<{ comment: ZodOptional<ZodString>; name: ZodOptional<ZodString>; traceId: ZodString; value: ZodOptional<ZodUnion<readonly [ZodBoolean, ZodNumber, ZodString]>>; }, $strip>

Request body for POST ${basePath}/route/feedback.

Fields:

  • traceId: MLflow trace id the feedback attaches to (the tr-<hex> value the server sent via MLFLOW_TRACE_ID_HEADER).
  • name: assessment name. Defaults to DEFAULT_FEEDBACK_NAME for a value, DEFAULT_COMMENT_NAME for a comment-only submit.
  • value: the thumbs / rating value (omit for a comment-only submit).
  • comment: freeform rationale. Logged as the assessment value when value is absent, or as the rationale alongside a value.

Refined so an empty submission (neither a value nor a non-empty comment) is rejected rather than logging a meaningless assessment.