DocsConfigurationCustom Models

Custom Models

Use custom or fine-tuned models with Lattice.

Lattice supports custom models including fine-tuned versions, self-hosted models, and models from various providers.

Supported Providers

  • OpenAI (GPT-4, GPT-3.5, custom fine-tunes)
  • Anthropic (Claude 3 family)
  • Google (Gemini Pro, Ultra)
  • Azure OpenAI
  • Self-hosted (Ollama, vLLM)
  • Custom endpoints

Adding a Custom Model

javascript
// Register a custom model
await client.models.register({
  name: 'my-finetuned-model',
  provider: 'openai',
  modelId: 'ft:gpt-4:my-org::xxxxx',
  config: {
    maxTokens: 8192,
    temperature: 0.5
  }
});

// Use in an agent
const agent = new Agent({
  model: 'my-finetuned-model'
});

Self-Hosted Models

javascript
await client.models.register({
  name: 'local-llama',
  provider: 'custom',
  endpoint: 'http://localhost:11434/v1',
  format: 'openai-compatible'
});