dust-llm
Provides the workflow and configuration requirements for adding support for new large language models.
Install
mkdir -p .claude/skills/dust-llm && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4670" && unzip -o skill.zip -d .claude/skills/dust-llm && rm skill.zipInstalls to .claude/skills/dust-llm
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Step-by-step guide for adding support for a new LLM in Dust. Use when adding a new model, or updating a previous one.Key capabilities
- →Configure provider-specific model IDs
- →Map token-based pricing structures
- →Define central model registry entries
- →Update router whitelists
- →Implement integration test suites
How it works
Follows a defined checklist of files across the codebase to register type definitions, pricing logic, and testing integration points for the new model.
Inputs & outputs
When to use dust-llm
- →Register new LLM provider
- →Update model configuration
- →Add model tests
About this skill
Adding Support for a New LLM Model
This skill guides you through adding a newly released LLM to the model_constructors +
llms stack (the endpoint-class router). It replaces the legacy lib/api/llm/clients/*
router, which no longer exists.
Mental model
A model reaches production through three stacked layers. Add the new model to each:
- Model config (
front/types/assistant/models/*) — the legacyModelConfigurationTypedescribing the model (context, vision, reasoning efforts, pricing tiers). Still the source of truth consumed by the UI, pricing, and the dust layer. model_constructors(front/lib/model_constructors/*) — provider-agnostic endpoint classes, one per(provider, model, region, provider-api). Each class mixes a shared provider base client with a per-model config mixin (input schema, context size, token pricing). This is where the real request/response shape and the narrowed input config live.llms(dust layer) (front/lib/llms/*) — thin Dust-specific wrappers around themodel_constructorsclasses that add Dust concerns (display name,byok, endpoint filters, and any caps — e.g. exposing 250k context on a model that natively supports 1M). Registered intoDUST_STREAM_ENDPOINTS.
Endpoints are named and filed as:
{provider}_{model}_{region}_{provider_api}.ts
e.g. google_gemini_3_6_flash_global_agent_platform.ts. The class name is the
PascalCase of the same, with numbers spelled out:
GoogleGeminiThreeDotSixFlashGlobalAgentPlatformStream.
The fastest, most reliable way to add a model is to copy the most recent model in the same family across all layers and rename. Grep every reference to that model and mirror each one. This skill lists the reference points; the sibling model is your template.
Before you start: verify against official docs (MANDATORY)
You MUST confirm every value below against the provider's official documentation and leave a URL + date in a code comment next to it. Do not carry values over from memory.
- Specs (context window, max output tokens, vision, structured output):
- OpenAI:
https://platform.openai.com/docs/models - Anthropic:
https://docs.anthropic.com/en/docs/about-claude/models/overview - Google:
https://ai.google.dev/gemini-api/docs/models - Mistral:
https://docs.mistral.ai/getting-started/models/models_overview/
- OpenAI:
- Pricing (input / output / cached input per 1M tokens):
- OpenAI:
https://openai.com/api/pricing/ - Anthropic:
https://www.anthropic.com/pricing#anthropic-api - Google:
https://ai.google.dev/gemini-api/docs/pricing - Mistral:
https://mistral.ai/technology/#pricing
- OpenAI:
- Host / region availability: verify which provider APIs and regions actually serve the model day-one. Mirror the sibling model's endpoints, but only register an endpoint whose region is actually available. Keep an unavailable-but-anticipated endpoint class defined and unregistered (see Gemini's EU agent-platform example) with a comment saying why.
WebSearch/WebFetch the docs first. If a value can't be confirmed, surface it — don't guess.
Reference points to mirror (grep the sibling model)
Pick the newest sibling (e.g. for "Gemini 3.6 Flash" the sibling is "Gemini 3.5 Flash") and
grep -rln its id / const / class-name / model-id string. You will touch, roughly:
A. Model config + central registry
| File | What to add |
|---|---|
front/types/assistant/models/{provider}.ts | X_MODEL_ID const + X_MODEL_CONFIG. Set isLatest: false on the previous model in the same family and drop "latest" from its description. |
front/types/assistant/models/models.ts | Add id to STATIC_MODEL_IDS and config to SUPPORTED_MODEL_CONFIGS (imports in both alpha blocks). |
front/types/assistant/models/auto.ts | If the model should participate in auto/auto_fast/auto_complex routing, add a ModelStreamCandidate. |
front/lib/model_constructors/types/models.ts | Add export const X = "model-id" and include it in the MODELS array (this is the model_constructors id type). |
B. Pricing / tiers / reasoning (TYPE-ENFORCED over StaticModelIdType)
Adding the id to STATIC_MODEL_IDS makes these fail to compile until updated:
| File | What to add |
|---|---|
front/lib/api/assistant/token_pricing/global.ts | CURRENT_MODEL_PRICING entry (input/output/cache_read_input_tokens per 1M) + doc URL comment. |
front/lib/api/assistant/token_pricing/static_model_reasoning_efforts.ts | { none, light, medium, high } support map. Must match the config's supportedReasoningEfforts (enforced by tiers.test.ts). |
front/lib/api/assistant/token_pricing/tiers.ts | STATIC_MODEL_TIERS entry mapping each supported effort → tier name. |
C. model_constructors — the endpoint classes (stream)
| File | What to add |
|---|---|
front/lib/model_constructors/providers/{provider}/models/{model}.ts | Config mixin WithXConfig(Base) exposing static model, static configSchema, static contextSize, static maxOutputTokens. Reuse the provider's shared inputConfig/reasoning_efforts/shared helpers. contextSize/maxOutputTokens are the REAL provider values — caps belong in the dust layer. |
front/lib/model_constructors/stream/endpoints/{provider}_{model}_{region}_{api}.ts | One class per available (region, provider-api), extending WithXConfig(BaseClient). Set static tokenPricing (per-endpoint, region-adjusted), region, regionalEndpoint, and static id = this.buildId(). Base clients live in stream/clients/*. |
front/lib/model_constructors/stream/index.ts | Import + register each available endpoint in STREAM_ENDPOINTS. |
D. model_constructors — tests (TDD, see below)
| File | What to add |
|---|---|
front/lib/model_constructors/test/endpoints/{...}.test.ts | One StreamSetup per endpoint. Copy the sibling's key set, but start every case at null — never copy its expected values (see the TDD loop). |
front/lib/model_constructors/test/endpoints/setups.ts | Import + register each registered endpoint's setup (satisfies Record<StreamEndpointId, StreamSetup> forces completeness). |
E. llms — the dust layer (stream)
| File | What to add |
|---|---|
front/lib/llms/providers/{provider}/models/{model}.ts | Dust config mixin WithDustXConfig(Base) — Object.assignes the legacy X_MODEL_CONFIG onto the class and overrides displayName/description/byok (and any caps). |
front/lib/llms/stream/endpoints/{...}.ts | One thin dust wrapper per endpoint extending the model_constructors class via the dust mixin; call defineDustStreamEndpoint(...). |
front/lib/llms/stream/index.ts | Register each available dust endpoint in DUST_STREAM_ENDPOINTS (satisfies Record<StreamEndpointId, ...>). |
F. SDK + UI + marketing mirror
| File | What to add |
|---|---|
sdks/js/src/types.ts | Add the id to the KnownModelLLMId union. Then rebuild the SDK types (cd sdks/js && npm run build:types) so front's sdk_drift.test.ts (which reads the built @dust-tt/client) passes. |
front/components/providers/model_configs.ts | Add config to USED_MODEL_CONFIGS so it shows in the UI. |
marketing/types/assistant/models/models.ts | Add { modelId, displayName, providerId } snapshot. |
marketing/lib/api/assistant/token_pricing.ts | Add the pricing entry (keep in sync with front). |
Batch endpoints (
.../batch/...) are a curated subset — only add them if the model needs batch. They are NOT completeness-enforced. SetsupportsBatchProcessingto the real capability regardless.
The TDD loop (steps to actually run)
The endpoint classes derive their behavior from a shared integration test harness. Let the live API tell you the input contract — never infer it from the sibling model. Sibling expectations are the single biggest source of wrong config: two models in the same family routinely differ on temperature, reasoning efforts, and forced tool use.
The config schema must ALWAYS mirror the API's real behavior as closely as possible. It
describes what the provider accepts — not what Dust happens to send today, and not what would
be convenient. If the API accepts a value, the schema accepts it; if the API rejects a value,
the schema rejects it. Never narrow past the API because an upstream layer already strips the
field (the dropTemperature / dropTemperatureWhenReasoning config parsers in lib/llms are
a product policy and belong there, not in the endpoint schema), and never widen past it to
avoid a union. Concretely: Anthropic reasoning models accept exactly temperature: 1, so the
field is z.literal(1).optional().default(1) — not z.undefined(), even though the Dust layer
drops it before the endpoint ever sees it.
When a divergence from the API is genuinely wanted (exposing a narrower effort set to control cost, say), it is a policy choice — write it as a comment stating that the API allows more and why Dust doesn't, so the next reader doesn't mistake it for a provider constraint.
Reasoning efforts must ALWAYS mirror the model's official documentation, not merely whatever the endpoint happens to accept. This is the one place where "what the API tolerates" is the wrong source of truth, because gateways are routinely looser than the models they serve:
- The Fireworks gateway validates
reasoning_effortagainst low/medium/high/xhigh/max/none for every model it hosts, so a live run "passes" on efforts the model never defined. - DeepSeek documents disabled/high/max and says low/medium are mapped to high and xhigh to max — accepting them would silently rewrite the caller's choice.
- Kimi K3 is documented low/high/max by Moonshot;
mediumworks through Fireworks but is not a K3 eff
Content truncated.
When not to use it
- →When only updating system prompts without changing model infra
- →When the model is already registered in the registry
- →If adding support for a provider not supported by Dust architecture
Prerequisites
Limitations
- →Requires manual verification of provider docs
- →Config files are highly specific to the Dust architecture
- →Manual test update required
How it compares
It provides a structured schema for integration rather than relying on trial-and-error configuration updates.
Compared to similar skills
dust-llm side by side with the closest alternatives in the catalog.
Try saying
Example prompts that trigger this skill in your AI assistant.
More by dust-tt
View all by dust-tt →You might also like
langchain
zechenzhangAGI
Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG applications. Best for rapid prototyping and production deployments.
ai-sdk
vercel
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
langfuse
davila7
Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production. Use when: langfuse, llm observability, llm tracing, prompt management, llm evaluation.
llm-application-dev
skillcreatorai
Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.
llm-patterns
alinaqi
AI-first application patterns, LLM testing, prompt management
azure-ai-projects-ts
microsoft
Build AI applications using Azure AI Projects SDK for JavaScript (@azure/ai-projects). Use when working with Foundry project clients, agents, connections, deployments, datasets, indexes, evaluations, or getting OpenAI clients.