fix(agents): mark sensitive-stop payload as error with isError flag
Add isError: true to the sensitive stop_reason payload so downstream consumers (e.g. cron delivery) correctly treat it as an error. Add 'sensitive' to the error kind union type.
This commit is contained in:
parent
33316ea4be
commit
1adc05aa6a
@ -1320,6 +1320,7 @@ export async function runEmbeddedPiAgent(
|
||||
text:
|
||||
"I can't respond to that - the content was flagged by the model's safety filter. " +
|
||||
"Please rephrase or try a different topic.",
|
||||
isError: true,
|
||||
},
|
||||
],
|
||||
meta: {
|
||||
|
||||
@ -41,7 +41,8 @@ export type EmbeddedPiRunMeta = {
|
||||
| "compaction_failure"
|
||||
| "role_ordering"
|
||||
| "image_size"
|
||||
| "retry_limit";
|
||||
| "retry_limit"
|
||||
| "sensitive";
|
||||
message: string;
|
||||
};
|
||||
/** Stop reason for the agent run (e.g., "completed", "tool_calls"). */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user