오류 및 거부/모델 거부

모델 거부 감지

Claude 모델이 거부하면 Wokey는 Anthropic의 거부 응답을 그대로 전달합니다. 하위 플랫폼은 아래 필드로 거부를 감지하고 자체 리스크 관리를 적용할 수 있습니다.

이 페이지 내용expand_more

요약link

  • 거부는 오류 상태가 아니라 HTTP 200으로 반환됩니다. 응답의 필드로 감지하세요.
  • 거부 사유는 응답의 마지막에 옵니다. 스트림에서는 거부 전에 전송된 내용이 철회되지 않습니다.
  • Wokey는 거부 내용을 바꾸지 않으며, 문구는 Anthropic이 작성한 것입니다.

API 형식별 감지 방법link

Anthropic Messages /v1/messages

감지 조건 stop_reason == "refusal"

카테고리는 stop_details.category에, 사유는 stop_details.explanation에 있습니다. 스트림에서는 마지막 message_delta 이벤트에, 비스트리밍 응답에서는 메시지의 최상위에 담겨 있습니다.

SSE
event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"refusal","stop_sequence":null,"stop_details":{"type":"refusal","category":"cyber","explanation":"This request triggered ..."}},"usage":{...}}

event: message_stop
data: {"type":"message_stop"}

OpenAI Chat Completions /v1/chat/completions

감지 조건 finish_reason == "content_filter"

사유는 refusal 필드에 있습니다. 스트림에서는 마지막 청크의 choices[0].delta.refusal, 비스트리밍에서는 choices[0].message.refusal이며, 이때 message.content는 null입니다. 이 형식에는 카테고리가 없습니다.

SSE
data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"refusal":"This request triggered ..."},"finish_reason":"content_filter"}],"usage":{...}}

data: [DONE]

OpenAI Responses /v1/responses

감지 조건 output에 type이 "refusal"인 content part가 포함됨

사유는 해당 part의 refusal 필드에 있습니다. 스트림은 response.refusal.delta와 response.refusal.done 이벤트를 보내며, output_text는 빈 문자열입니다. 이 형식에는 카테고리가 없습니다.

SSE
event: response.refusal.done
data: {"type":"response.refusal.done","item_id":"msg_...","output_index":0,"content_index":0,"refusal":"This request triggered ..."}

거부 카테고리와 문구link

category의미explanation(원문)
reasoning_extraction서비스 약관: 모델 출력의 리버스 엔지니어링 또는 복제(증류)This request was blocked as it seems to violate Anthropic's Terms of Service restrictions on reverse engineering or duplicating model outputs. To learn more, visit https://www.anthropic.com/legal/commercial-terms.
frontier_llm서비스 약관: 경쟁 모델 제품 개발This request was blocked as our automated systems flagged that it may violate Anthropic's Terms of Service restrictions on developing competing model products. To learn more, visit https://www.anthropic.com/legal/commercial-terms.
cyber사이버 관련 콘텐츠(Opus 5 이후, Fable, Sonnet 5.5)This request triggered restrictions on violative cyber content and was blocked under Anthropic's Usage Policy. To learn more, see https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback.
cyber사이버 관련 콘텐츠(Opus 4.x, Sonnet 5, Haiku 5.5)This request triggered cyber-related safeguards. To learn about the Cyber Verification Program and apply for access, visit our help center: https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude.
general_harms폭발물 등 일반적인 위해This request triggered restrictions on content related to the development of high-yield explosives and was blocked under Anthropic's Usage Policy. To learn more, provide feedback, or request an exemption based on how you use Claude, visit our help center: https://support.claude.com/
bio, others생물학 및 업스트림이 사유를 제공하지 않는 기타 콘텐츠Anthropic 형식에는 explanation 필드가 없으며, OpenAI 형식은 "The upstream model refused this request."를 반환합니다

참고 사항link

  • 문구는 Anthropic이 작성하며 언제든 바뀔 수 있습니다. 정확한 문구를 비교하기보다 감지 필드와 category를 사용하세요.
  • OpenAI 형식에는 category가 없습니다. 이 형식에서 거부를 분류하려면 위의 문구와 대조하세요.