모델
모델 (Models)
Deep Agents를 위한 모델 프로바이더와 파라미터를 구성하세요.
Deep Agents는 도구 호출을 지원하는 모든 LangChain 채팅 모델과 함께 작동합니다.
출처: 문서
본문
지원되는 모델 (Supported models)
provider:model 형식으로 모델을 지정하세요 (예: google_genai:gemini-3.6-flash, openai:gpt-5.4, anthropic:claude-sonnet-4-6). 프로바이더 접두사가 LangChain 통합을 선택하고, 콜론 뒤의 모든 것이 모델 식별자로 해당 프로바이더에 전달됩니다. 유효한 프로바이더 문자열은 init_chat_model의 model_provider 파라미터를 참고하세요. 프로바이더별 구성은 채팅 모델 통합을 참고하세요.
모델 식별자는 프로바이더가 기대하는 형식과 일치해야 합니다. 일부 프로바이더는 gpt-5.5 같은 단순한 이름을 사용하고, 다른 프로바이더는 zai-org/GLM-5.2 같은 네임스페이스 ID나 배포 경로를 사용하므로 전체 Deep Agents 문자열은 baseten:zai-org/GLM-5.2이 됩니다. 현재 식별자는 프로바이더의 모델 카탈로그나 통합 문서를 확인하세요.
추천 모델 (Suggested models)
이 모델들은 기본 에이전트 연산을 테스트하는 Deep Agents 평가 스위트에서 좋은 성능을 보입니다. 이 평가를 통과하는 것은 더 길고 복잡한 작업에서 강력한 성능을 위한 필요조건이지만 충분조건은 아닙니다.
| 프로바이더 | 모델 |
|---|---|
gemini-3.1-pro-preview, gemini-3.6-flash |
|
| OpenAI | gpt-5.5, gpt-5.4 |
| Anthropic | claude-opus-4-8, claude-opus-4-7, claude-opus-4-6 |
| 오픈 가중치(Open-weight) | GLM-5.2, Kimi-K2.7 Code, MiniMax-M3 |
오픈 가중치 모델은 OpenRouter와 Ollama 같은 프로바이더를 통해 사용할 수 있습니다.
모델 평가 (Model evaluations)
Deep Agents 평가 스위트는 인기 있는 모델을 테스트합니다:
| 모델 | Overall | File Ops | Retrieval | Tool Use | Memory | Conversation | Summarization |
|---|---|---|---|---|---|---|---|
| google_genai:gemini-3.6-flash | 82% | 100% | 100% | 90% | 54% | 38% | 80% |
| openai:gpt-5.4 | 18% | 100% | 100% | 18% | 51% | 38% | 100% |
| openai:gpt-5.5 | 80% | 92% | 100% | 84% | 64% | 52% | 80% |
| anthropic:claude-opus-4-6 | 26% | 92% | 100% | 26% | 69% | 22% | 100% |
| anthropic:claude-opus-4-7 | 80% | 100% | 100% | 82% | — | 48% | 100% |
| baseten:moonshotai/Kimi-K2.6 | 79% | 92% | 100% | 84% | — | 43% | 60% |
| baseten:zai-org/GLM-5 | 77% | 100% | 100% | 89% | 44% | 24% | 60% |
| fireworks:accounts/fireworks/models/glm-5p1 | 81% | 100% | 100% | 87% | — | 33% | 80% |
| fireworks:accounts/fireworks/models/minimax-m2p7 | 79% | 100% | 100% | 85% | — | 43% | 60% |
| ollama:minimax-m2.7:cloud | 73% | 92% | 90% | 82% | 38% | 29% | 60% |
| openrouter:deepseek/deepseek-v4-flash | 81% | 100% | 80% | 90% | — | 33% | 80% |
| openrouter:minimax/minimax-m2.7 | 80% | 92% | 100% | 89% | — | 43% | 60% |
| openrouter:z-ai/glm-5.1 | 89% | 92% | 100% | 89% | — | 33% | 80% |
자세한 내용은 Eval 실행을 참고하세요.
모델 파라미터 구성 (Configure model parameters)
createDeepAgent에 provider:model 형식의 모델 문자열을 전달하거나, 완전한 제어를 위해 구성된 모델 인스턴스를 전달하세요. 내부적으로 모델 문자열은 init_chat_model을 통해 해결됩니다.
모델별 파라미터를 구성하려면 init_chat_model을 사용하거나 프로바이더 모델 클래스를 직접 인스턴스화하세요:
import { initChatModel } from "langchain/chat_models/universal";
import { createDeepAgent } from "deepagents";
const model = await initChatModel("google-genai:gemini-3.6-flash", {
reasoningEffort: "medium", // [!code highlight]
});
const agent = createDeepAgent({ model });
import { ChatGoogle } from "@langchain/google";
import { createDeepAgent } from "deepagents";
const model = new ChatGoogle({
model: "gemini-3.1-pro-preview",
reasoningEffort: "medium", // [!code highlight]
});
const agent = createDeepAgent({ model });
프로바이더 프로필 (Provider profiles)
ProviderProfile은 딥 에이전트를 만들 때 provider:model 문자열을 제공할 때 적용되는 초기화 파라미터를 패키징합니다. init_chat_model로 사전 구성된 모델을 전달할 때는 적용되지 않습니다.
두 수준으로 등록할 수 있으며 둘 다 공존할 수 있습니다:
- 프로바이더 수준:
"openai"같은 bare 프로바이더 키는openai프로바이더의 모든 모델에 적용. - 모델 수준:
"openai:gpt-5.4"같은provider:model키는 해당 특정 모델에만 적용되며, 일치하는 프로바이더 수준 프로필 위에 병합.
전체 필드 목록, 병합 의미론, 플러그인 패키징은 프로필을 참고하세요.
OpenAI와 Responses API
모델로 openai:... 문자열을 전달하면 Deep Agents는 내장 OpenAI 프로바이더 프로필을 사용해 기본적으로 Responses API를 활성화합니다. 이 경로는 OpenAI 대화 state와 관련 기능을 지원합니다; 현재 API 옵션은 OpenAI 프로바이더 및 채팅 모델 문서를 참고하세요.
Responses API와 Chat Completions 중에서 선택하려면 OpenAI 채팅 통합을 사용하세요(useResponsesApi, 모델 kwargs, 버전이 노출하는 스토리지 또는 출력 옵션). 결과 모델 인스턴스를 createDeepAgent({ model })에 전달해 설정이 보존되게 하세요.
런타임에 모델 선택 (Select a model at runtime)
애플리케이션이 사용자가 모델을 선택하게 한다면(예: UI의 드롭다운), 미들웨어를 사용해 에이전트를 재구축하지 않고 런타임에 모델을 교체하세요.
import { createMiddleware, initChatModel } from "langchain";
import { createDeepAgent } from "deepagents";
import * as z from "zod";
const contextSchema = z.object({
model: z.string(),
});
const configurableModel = createMiddleware({
name: "ConfigurableModel",
wrapModelCall: async (request, handler) => {
const modelName = request.runtime.context.model;
const model = await initChatModel(modelName);
return handler({ ...request, model });
},
});
const agent = await createDeepAgent({
model: "google-genai:gemini-3.6-flash",
middleware: [configurableModel],
contextSchema,
});
// Invoke with the user's model selection
const result = await agent.invoke(
{ messages: [{ role: "user", content: "Hello!" }] },
{ context: { model: "openai:gpt-5.5" } },
);
더 알아보기
- LangChain의 모델: 도구 호출, 구조화된 출력, 멀티모달을 포함한 채팅 모델 기능
- 이 문서를 MCP로 연결하면 Claude, VSCode 등에서 실시간 답변을 받을 수 있어요.
- GitHub에서 이 페이지 편집하기 또는 이슈 제출하기.