mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-09-15 22:45:37 +02:00
feat(logging): record the provider reason for a failed agent turn
A failed provider turn collapsed to AGENT_EXECUTION_FAILED/unknown with the underlying reason discarded, so a model-side rejection or safeguard was indistinguishable from a transport fault in the error log. - add safeProviderTurnDetails: write bounded, non-sensitive fields (provider, model, responseId, stop reason, tool-in-flight, category, retryable) to error.log - gate a sanitized errorMessage snippet behind SHANNON_DEBUG_PROVIDER_ERRORS, off by default - forward SHANNON_DEBUG_PROVIDER_ERRORS from the CLI into the worker container
This commit is contained in:
@@ -31,6 +31,10 @@ const COMMON_FORWARD_VARS = [
|
||||
'SHANNON_AI_MODEL',
|
||||
'SHANNON_AI_BASE_URL',
|
||||
'SHANNON_AI_OPENAI_FORMAT',
|
||||
// Opt-in debug flag: when set, the worker persists a bounded, sanitized snippet of a failed
|
||||
// provider turn's raw error message to error.log. Off by default; provider prose stays out of
|
||||
// durable state unless an operator deliberately enables it for a diagnosis.
|
||||
'SHANNON_DEBUG_PROVIDER_ERRORS',
|
||||
GENERIC_API_KEY_ENV,
|
||||
] as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user