활성화 조건
다음 두 조건이 모두 충족될 때만:response_format이json_schema또는json_object로 설정된 경우- 응답 본문이 유효한 UTF-8이지만 수정 가능한 JSON 구문 오류가 포함된 경우
수정 대상
복구된 응답 감지
제한 사항
- 비스트리밍 전용 — 스트리밍 응답에는 적용되지 않음
- 잘린 출력은 복구하지 않음
- 구문 오류만 수정하며 의미 오류는 수정하지 않음
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ARouter는 json_schema 또는 json_object 응답 형식을 사용할 때 잘못된 형식의 JSON 응답을 자동으로 복구합니다.
response_format이 json_schema 또는 json_object로 설정된 경우| 문제 | 수정 후 |
|---|---|
| Markdown 코드 블록 | {"key": "value"} |
| 후행 쉼표 | {"a": 1, "b": 2} |
| 따옴표 없는 키 | {"key": "value"} |
| 텍스트 + JSON 혼합 | {"id": 1} |
| 단일 따옴표 문자열 | {"key": "value"} |
{
"choices": [{"message": {"role": "assistant", "content": "{\"name\": \"John Doe\"}"}, "finish_reason": "stop"}],
"x_arouter": {"response_healed": true}
}