SPB Git forge

spb/polyllm

Public
15commits 1branches 0releases
2.2 MBsize
maindefault branch
13 days agolast push
TypeScript 97.4% SQL 1% JavaScript 0.9% CSS 0.6%
3.0 KB · 22 lines typescript
Raw Blame History
1import type { CatalogEntry } from "@/lib/ai/registry/catalog";2import type { ModelCapabilities, ModelParameters } from "@/lib/ai/core/types";34/**5 * DeepSeek documented augmentation — docs/provider-research/deepseek.md (audited 2026-09-08, ~180 probes).6 * Verified: all V4 models are hybrid thinkers, ON by default at effort high; controls are7 * `thinking:{type:"enabled"|"disabled"}` + top-level `reasoning_effort: low|high|max` (medium → high);8 * `max_tokens` caps reasoning + answer together (range 1–393216); `response_format` only `json_object`9 * (prompt must mention "json"); temperature/top_p ignored in thinking mode; seed/penalties no-ops;10 * only `deepseek-v4-flash-vision-exp` sees images (the others silently drop them).11 * Pricing = peak (off-peak is −50 % outside Mon–Fri 01–04 & 06–10 UTC); cache hit = 1/32 of miss.12 */13const caps = (vision: boolean): ModelCapabilities => ({ text: true, vision, audioInput: false, audioOutput: false, imageGeneration: false, video: false, reasoning: true, tools: true, structuredOutput: true, streaming: true, files: false, webSearch: false });14const params: ModelParameters = { temperature: true, topP: true, topK: false, maxTokens: true, stop: true, seed: false, frequencyPenalty: false, presencePenalty: false, reasoningEffort: true, reasoningEffortLevels: ["none", "low", "medium", "high", "max"], thinkingBudget: false, temperatureRange: { min: 0, max: 2 } };15const meta = { thinkingParam: "thinking", reasoningEffortParam: true, jsonSchema: false, jsonWordRequired: true, defaultReasoningEffort: "high", minOutputForReasoning: 2000, samplingIgnoredWhenThinking: true };1617export const DEEPSEEK_CATALOG = new Map<string, CatalogEntry>([18  ["deepseek-v4-pro", { displayName: "DeepSeek V4 Pro", family: "DeepSeek V4", capabilities: caps(false), limits: { contextTokens: 1_000_000, maxOutputTokens: 393_216 }, parameters: params, pricing: { inputPerMillion: 1.32, cachedInputPerMillion: 0.044, outputPerMillion: 3.96, source: "deepseek-pricing-page (peak)", asOf: "2026-09-08" }, status: "active", sortWeight: 100, metadata: { ...meta, offPeakDiscount: 0.5, concurrency: 500 } }],19  ["deepseek-v4-flash", { displayName: "DeepSeek V4 Flash", family: "DeepSeek V4", capabilities: caps(false), limits: { contextTokens: 1_000_000, maxOutputTokens: 393_216 }, parameters: params, pricing: { inputPerMillion: 0.44, cachedInputPerMillion: 0.014, outputPerMillion: 1.32, source: "deepseek-pricing-page (peak)", asOf: "2026-09-08" }, status: "active", sortWeight: 95, metadata: { ...meta, offPeakDiscount: 0.5, concurrency: 2500 } }],20  ["deepseek-v4-flash-vision-exp", { displayName: "DeepSeek V4 Flash Vision (experimental)", family: "DeepSeek V4", capabilities: caps(true), limits: { contextTokens: 1_000_000, maxOutputTokens: 393_216 }, parameters: params, pricing: { inputPerMillion: 0.44, cachedInputPerMillion: 0.014, outputPerMillion: 1.32, source: "deepseek-pricing-page (peak)", asOf: "2026-09-08" }, status: "preview", sortWeight: 85, metadata: { ...meta, offPeakDiscount: 0.5, imageTokensMax: 384 } }],21]);22