LiteLLM o3-deep-research 예제 문서¶
이 사이트는 구현된 세 가지 예제를 한국어로 안내합니다.
- Python 직접 호출 예제
- Java 직접 호출 예제
- LiteLLM SDK + FastAPI + Hypercorn 중계 예제
이 저장소에서 할 수 있는 것¶
- LiteLLM Proxy를 통해
o3-deep-research모델 호출 chat/completions와responsesAPI 비교background: true제출 방식 이해- Java 호출자를 위한 relay/tool-calling 구조 확인
web_search_preview로 일반 모델에 실시간 웹 검색 추가system_prompt로 deep research 단계의 페르소나/출력 언어 제어text_format으로 JSON 출력 강제 (json_object,json_schema)- client-side
--auto-tool-call과 relay-sidePOST /api/v1/chat비교 - relay의 chat timeout / research timeout 분리 구조 확인
문서 읽는 순서¶
처음 보는 사용자에게는 다음 순서를 권장합니다.
- 시작하기
- Python 직접 호출
- Java 직접 호출
- Relay 중계 예제
- Responses / Background / Relay 스트리밍
- 자동 Tool Calling
- 중계 예제 구현 계획(보관)
빠른 사실 확인¶
- 현재 구현 완료: Python direct, Java direct, relay 중계 예제
- 현재 고급 기능:
--web-search,--auto-tool-call, relay/api/v1/chat,system_prompt,text_format - 현재 검증 상태: Python/Java/relay 테스트, docs build, GitHub Pages 배포, 라이브 검증 결과까지 문서화
핵심 고급 기능¶
web_search_preview: Python / Java direct client에서--api responses --web-searchsystem_prompt: relaydeep_researchwrapper에서 Responses APIinstructions로 전달text_format: relaydeep_researchwrapper에서 JSON 출력 강제 지원- 자동 tool calling: client-side
--auto-tool-call과 relay-sidePOST /api/v1/chat둘 다 구현
Relay /api/v1/chat 요약¶
이 저장소의 relay는 일반 대화 요청을 받아 모델이 스스로 deep_research를 호출할지 결정하는 POST /api/v1/chat 엔드포인트를 제공합니다.
요청 필드:
messagecontextauto_tool_callsystem_promptdeliverable_format
응답 필드:
contenttool_calledtool_nameresearch_summary
자세한 내용은 자동 Tool Calling과 Relay 중계 예제를 참고하세요.
Relay 환경 변수¶
RELAY_HOST— 기본127.0.0.1RELAY_PORT— 기본8080RELAY_TIMEOUT_SECONDS— Chat Completions orchestration timeout (기본30)RELAY_RESEARCH_TIMEOUT_SECONDS— deep_research execution timeout (기본300)LITELLM_CHAT_MODEL— relay auto tool calling orchestration 모델 (기본gpt-4o)RELAY_MAX_INVOCATIONS— 메모리에 유지할 최대 invocation 수 (기본1024)RELAY_MAX_STREAM_BYTES— stream invocation 하나가 메모리에 유지할 최대 UTF-8 바이트 수 (기본1000000)
라이브 검증 현황¶
- direct
chat/responses/background - relay
tool-invocationsforeground / background / stream - relay
/api/v1/chattool/no-tool --web-search--auto-tool-callsystem_prompt,deliverable_format
실제 실행 예시와 결과는 통합 매뉴얼에서 확인할 수 있습니다.