퓨전 모델
퓨전 모델 (Fusion Model)
litellm/fusion-1은 독립적인 모델 관점이 유용한 요청을 위해 LiteLLM이 제공하는 가상 모델이에요. 여러 모델이 독립적으로 답한 뒤, judge가 비교해 최종 응답을 하나로 합성해 줘요.
출처: 문서
본문
litellm/fusion-1은 독립적인 모델 관점이 유용한 요청을 위해 LiteLLM이 제공하는 가상 모델이에요. 이 모델은 요청을 설정 가능한 패널(panel)에 병렬로 보내고, 성공한 응답들을 비교하도록 judge에게 요청한 뒤, judge가 하나의 공개 응답을 합성해 내요.
요청과 응답은 여러분이 호출한 SDK 메서드의 네이티브 모양을 그대로 유지해요. Fusion은 Chat Completions, Anthropic Messages, Responses 모두에서 작동해요.
judge는 먼저 합의(consensus), 모순, 커버리지 공백, 고유 통찰, 사각지대를 다루는 구조화된 비교를 생성해요. LiteLLM은 그 비공개 분석을 다시 judge에게 전달하고, judge가 최종 답변을 작성해요. 공개 응답의 model 필드는 그 응답을 만든 구체적인 judge 모델을 식별해요.
퀵 스타트 (Quick Start)
패널과 judge가 사용하는 모든 프로바이더에 자격 증명을 설정하세요. 같은 fusion 설정이 세 SDK 인터페이스 모두에서 동작해요.
- Chat Completions
import litellm
fusion = {
"models": [
"openai/gpt-4o-mini",
"anthropic/claude-haiku-4-5",
],
"judge": {
"model": "openai/gpt-4o-mini",
"criteria": "Prioritize correctness and verifiable evidence.",
},
}
response = litellm.completion(
model="litellm/fusion-1",
messages=[
{
"role": "user",
"content": "Review this database migration plan for operational risks.",
}
],
fusion=fusion,
)
print(response.model)
print(response.choices[0].message.content)
- Anthropic Messages
import litellm
fusion = {
"models": [
"openai/gpt-4o-mini",
"anthropic/claude-haiku-4-5",
],
"judge": {
"model": "openai/gpt-4o-mini",
"criteria": "Prioritize correctness and verifiable evidence.",
},
}
response = litellm.anthropic.messages.create(
model="litellm/fusion-1",
max_tokens=2048,
messages=[
{
"role": "user",
"content": "Review this database migration plan for operational risks.",
}
],
fusion=fusion,
)
print(response["model"])
print(response["content"][0]["text"])
- Responses
import litellm
fusion = {
"models": [
"openai/gpt-4o-mini",
"anthropic/claude-haiku-4-5",
],
"judge": {
"model": "openai/gpt-4o-mini",
"criteria": "Prioritize correctness and verifiable evidence.",
},
}
response = litellm.responses(
model="litellm/fusion-1",
input="Review this database migration plan for operational risks.",
fusion=fusion,
)
print(response.model)
print(response.output_text)
litellm/fusion-1을 호출하면 항상 deliberation(숙고)이 실행돼요. 별도 플래그는 없어요. fusion을 생략하면 기본 패널과 judge를 사용해요.
응답 동작 (Response Behavior)
Fusion은 호출한 SDK 메서드의 형식으로 하나의 정상 응답을 반환해요. 별도의 패널 응답이나 비공개 judge 비교는 반환하지 않아요. 응답의 숨겨진 Fusion 메타데이터는 deliberation이 실행됐는지, 패널 호출이 몇 개 성공·실패했는지를 콘텐츠 없이 보고해요. 숨겨진 router 필드는 litellm/fusion-1을 식별해요.
설정 (Configuration)
model="litellm/fusion-1" 옆에 fusion 딕셔너리를 전달해요. 모든 필드는 선택사항이에요.
| 필드 | 기본값 | 설명 |
|---|---|---|
models |
LiteLLM 기본 패널 | 병렬로 독립 답변하는 1~8개 모델 |
judge.model |
LiteLLM 기본 judge | 성공한 패널 응답을 비교하고 최종 답변을 작성하는 모델 |
judge.criteria |
없음 | 패널 응답을 비교하는 데 쓰는 지침 |
max_completion_tokens |
16000 |
각 내부 호출의 최대 출력 토큰(추론 포함) |
reasoning |
프로바이더 기본값 | 패널·judge 호출에 전달되는 추론 노력 |
temperature |
프로바이더 기본값 | 패널 호출에 전달되는 온도. judge는 temperature 0을 사용해요 |
도구 & 스트리밍 (Tools and Streaming)
공개 요청에는 표준 도구를 그대로 쓸 수 있어요. 클라이언트 도구 스키마는 패널·비교 호출에는 비공개로 유지돼요. judge는 최종 응답을 작성할 때 그것들을 받아요.
스트리밍은 비동기 SDK 메서드(litellm.acompletion(), litellm.anthropic.messages.acreate(), litellm.aresponses())를 사용해요. 동기 스트리밍은 해당 비동기 메서드를 안내하며 거부돼요.
비용 & 재귀 (Cost and Recursion)
Fusion은 공개 요청 하나에 여러 프로바이더 호출을 수행해요. 비용과 지연 시간은 패널 크기와 설정된 모델에 따라 늘어나요. 패널·judge 모델은 litellm/fusion-1을 재귀적으로 호출할 수 없어요 — deliberation은 한 단계로 제한돼요.