/** * Factory Droid model catalog + pricing. * * Model ids and reasoning levels come from https://docs.factory.ai/models.md. * Factory is a SUBSCRIPTION product (Pro/Plus/Max + credit multipliers) — there * are no public per-token USD prices. All costs are therefore $0 (unknown), * exactly like the Command Code backend's unknown-model fallback: a $0 display * does NOT mean the provider is free. Hosts may override per-model pricing by * hooking onPayload or editing this table. */ import type { ModelCost } from "./types.ts" export interface FactoryDroidModelCost extends ModelCost {} export const ZERO_FACTORY_DROID_MODEL_COST: FactoryDroidModelCost = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, } /** Per-model relative credit multipliers (from Factory docs, for reference). */ export const FACTORY_DROID_MODEL_MULTIPLIERS: Record = { "claude-fable-5": 4, "claude-opus-5": 2, "claude-opus-5-fast": 4, "claude-sonnet-5": 0.8, "claude-haiku-4-5-20251001": 0.4, "gpt-5.6-sol": 2, "gpt-5.6-terra": 0.8, "gpt-5.5": 2, "gpt-5.5-fast": 5, "gpt-5.4": 1, "gemini-3.1-pro-preview": 0.8, "gemini-3.6-flash": 0.6, "grok-4.5": 0.8, "glm-5.2": 0.55, "kimi-k3": 0.6, "deepseek-v4-pro": 0.7, "minimax-m2.7": 0.12, } /** * Static model list. `auto` = Factory Router picks the best model per task. * contextWindow/maxTokens are conservative estimates — Factory manages the * agent's context internally; these only drive pi's token accounting UI. */ export interface FactoryDroidModelEntry { id: string name: string reasoning: boolean contextWindow: number maxTokens: number cost?: ModelCost } export const FACTORY_DROID_MODELS: readonly FactoryDroidModelEntry[] = [ { id: "auto", name: "Factory Auto (best model)", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "claude-fable-5", name: "Claude Fable 5", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "claude-opus-5", name: "Claude Opus 5", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "claude-opus-5-fast", name: "Claude Opus 5 Fast", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "claude-sonnet-5", name: "Claude Sonnet 5", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "claude-haiku-4-5-20251001", name: "Claude Haiku 4.5", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "gpt-5.6-sol", name: "GPT-5.6 Sol", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "gpt-5.6-terra", name: "GPT-5.6 Terra", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "gpt-5.5", name: "GPT-5.5", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "gpt-5.5-fast", name: "GPT-5.5 Fast", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "gpt-5.4", name: "GPT-5.4", reasoning: true, contextWindow: 200_000, maxTokens: 65_536, }, { id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, { id: "gemini-3.6-flash", name: "Gemini 3.6 Flash", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, { id: "grok-4.5", name: "Grok 4.5", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, { id: "glm-5.2", name: "GLM 5.2", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, { id: "kimi-k3", name: "Kimi K3", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, { id: "minimax-m2.7", name: "MiniMax M2.7", reasoning: true, contextWindow: 128_000, maxTokens: 65_536, }, ]