Models
Configure OpenAI, Ollama, or OpenRouter with Agentdock's model package.
Use AgentDockModel to configure a provider. Your app does not need to import a model class from LangChain.
OpenAI
Set OPENAI_API_KEY, then pass the model to Agentdock:
import { AgentDockModel } from "@agentdock-ai/models";
const model = AgentDockModel.openAI({ model: "gpt-5.4-mini" });You can also pass apiKey, baseUrl, or temperature:
const model = AgentDockModel.openAI({
model: "gpt-5.4-mini",
apiKey: process.env.OPENAI_API_KEY,
temperature: 0.2,
});Ollama
Make sure Ollama is running and the model is available, then configure it:
const model = AgentDockModel.ollama({
model: "llama3.2",
baseUrl: "http://localhost:11434",
});baseUrl is optional when your Ollama server uses its default address.
OpenRouter
Set OPENROUTER_API_KEY, then select an OpenRouter model:
const model = AgentDockModel.openRouter({
model: "openai/gpt-4o-mini",
});OpenAI, Ollama, and OpenRouter models can all be passed to new AgentDock({ model }).
See context management to set a separate model for summaries.

