Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/sie_gateway/src/http_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ pub mod openai_code {
/// the whole budget, #3104/#3136). Terminal and non-retryable: tokens were
/// genuinely consumed, so it settles exactly like ``inference_error``.
pub const EMPTY_MODEL_OUTPUT: &str = "empty_model_output";
/// Worker terminal for a guard model whose first output positions carry
/// no complete Yes/No verdict distribution. Terminal and non-retryable;
/// settles like ``empty_model_output``.
pub const INVALID_GUARD_VERDICT: &str = "invalid_guard_verdict";
}

/// OpenAI-shaped error body:
Expand Down
2 changes: 2 additions & 0 deletions packages/sie_gateway/src/queue/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ pub(crate) fn client_safe_worker_error_code(code: &str) -> &'static str {
openai_code::CANCELLED => openai_code::CANCELLED,
openai_code::CONTEXT_EXCEEDED => openai_code::CONTEXT_EXCEEDED,
openai_code::EMPTY_MODEL_OUTPUT => openai_code::EMPTY_MODEL_OUTPUT,
openai_code::INVALID_GUARD_VERDICT => openai_code::INVALID_GUARD_VERDICT,
"grammar_invalid" => "grammar_invalid",
"invalid_request" => "invalid_request",
"parallel_tool_calls_violated" => "parallel_tool_calls_violated",
Expand Down Expand Up @@ -1392,6 +1393,7 @@ mod tests {
"cancelled",
"context_exceeded",
"empty_model_output",
"invalid_guard_verdict",
"grammar_invalid",
"invalid_request",
"parallel_tool_calls_violated",
Expand Down
Loading