Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
347 changes: 344 additions & 3 deletions packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions packages/cost/models/authors/alibaba/qwen3/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,74 @@ export const endpoints = {
"*": {},
},
},
"qwen3.8-27b:engy": {
providerModelId: "qwen3.8-27b",
provider: "engy",
author: "qwen",
pricing: [
{
threshold: 0,
input: 0.000000045, // $0.045/1M
output: 0.00000032, // $0.32/1M
cacheMultipliers: {
cachedInput: 0.333, // $0.015/1M cache read vs $0.045/1M input
},
},
],
contextLength: 1_001_536,
maxCompletionTokens: 16_384,
supportedParameters: [
"max_tokens",
"temperature",
"top_p",
"stop",
"stream",
"frequency_penalty",
"presence_penalty",
"seed",
"tools",
"tool_choice",
"response_format",
],
ptbEnabled: false,
endpointConfigs: {
"*": {},
},
},
"qwen3.6-35b-a3b:engy": {
providerModelId: "qwen3.6-35b-a3b",
provider: "engy",
author: "qwen",
pricing: [
{
threshold: 0,
input: 0.000000045, // $0.045/1M
output: 0.0000003, // $0.30/1M
cacheMultipliers: {
cachedInput: 0.333, // $0.015/1M cache read vs $0.045/1M input
},
},
],
contextLength: 208_192,
maxCompletionTokens: 16_384,
supportedParameters: [
"max_tokens",
"temperature",
"top_p",
"stop",
"stream",
"frequency_penalty",
"presence_penalty",
"seed",
"tools",
"tool_choice",
"response_format",
],
ptbEnabled: false,
endpointConfigs: {
"*": {},
},
},
} satisfies Partial<
Record<`${Qwen3ModelName}:${ModelProviderName}`, ModelProviderConfig>
>;
22 changes: 22 additions & 0 deletions packages/cost/models/authors/alibaba/qwen3/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,28 @@ export const models = {
modality: { inputs: ["text"], outputs: ["text"] },
tokenizer: "Qwen",
},
"qwen3.8-27b": {
name: "Qwen3.8 27B",
author: "qwen",
description:
"Qwen3.8 27B is a 27 billion parameter multimodal model in the Qwen series, supporting text and image inputs with a 1M token context window for reasoning, coding, and agentic workloads.",
contextLength: 1_001_536,
maxOutputTokens: 16_384,
created: "2026-08-01T00:00:00.000Z",
modality: { inputs: ["text", "image"], outputs: ["text"] },
tokenizer: "Qwen",
},
"qwen3.6-35b-a3b": {
name: "Qwen3.6 35B A3B",
author: "qwen",
description:
"Qwen3.6 35B A3B is a Mixture-of-Experts model in the Qwen series with 35B total and 3B active parameters, offering strong efficiency for general dialogue and reasoning with a 208K token context window.",
contextLength: 208_192,
maxOutputTokens: 16_384,
created: "2026-05-01T00:00:00.000Z",
modality: { inputs: ["text"], outputs: ["text"] },
tokenizer: "Qwen",
},
} satisfies Record<string, ModelConfig>;

export type Qwen3ModelName = keyof typeof models;
79 changes: 79 additions & 0 deletions packages/cost/models/authors/deepseek/deepseek-v4/endpoints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { ModelProviderName } from "../../../providers";
import type { ModelProviderConfig } from "../../../types";
import { DeepSeekV4ModelName } from "./models";

export const endpoints = {
"deepseek-v4.1-flash:engy": {
providerModelId: "deepseek-v4.1-flash",
provider: "engy",
author: "deepseek",
pricing: [
{
threshold: 0,
input: 0.00000003, // $0.03/1M
output: 0.00000012, // $0.12/1M
cacheMultipliers: {
cachedInput: 0.2, // $0.006/1M cache read (20% of input)
},
},
],
contextLength: 1_048_576,
maxCompletionTokens: 65_536,
supportedParameters: [
"max_tokens",
"temperature",
"top_p",
"stop",
"stream",
"frequency_penalty",
"presence_penalty",
"seed",
"tools",
"tool_choice",
"response_format",
],
ptbEnabled: false,
endpointConfigs: {
"*": {},
},
},
"deepseek-v4-flash-0731:engy": {
providerModelId: "deepseek-v4-flash-0731",
provider: "engy",
author: "deepseek",
pricing: [
{
threshold: 0,
input: 0.000000045, // $0.045/1M
output: 0.00000009, // $0.09/1M
cacheMultipliers: {
cachedInput: 0.2, // $0.009/1M cache read (20% of input)
},
},
],
contextLength: 1_048_576,
maxCompletionTokens: 65_536,
supportedParameters: [
"max_tokens",
"temperature",
"top_p",
"stop",
"stream",
"frequency_penalty",
"presence_penalty",
"seed",
"tools",
"tool_choice",
"response_format",
],
ptbEnabled: false,
endpointConfigs: {
"*": {},
},
},
} satisfies Partial<
Record<
`${DeepSeekV4ModelName}:${ModelProviderName}` | DeepSeekV4ModelName,
ModelProviderConfig
>
>;
28 changes: 28 additions & 0 deletions packages/cost/models/authors/deepseek/deepseek-v4/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { ModelConfig } from "../../../types";

export const models = {
"deepseek-v4.1-flash": {
name: "DeepSeek V4.1 Flash",
author: "deepseek",
description:
"DeepSeek V4.1 Flash is the fast multimodal variant of DeepSeek V4.1, supporting text and image inputs with a 1M token context window for latency-sensitive and high-throughput workloads.",
contextLength: 1_048_576,
maxOutputTokens: 65_536,
created: "2026-09-01T00:00:00.000Z",
modality: { inputs: ["text", "image"], outputs: ["text"] },
tokenizer: "DeepSeek",
},
"deepseek-v4-flash-0731": {
name: "DeepSeek V4 Flash (0731)",
author: "deepseek",
description:
"DeepSeek V4 Flash (0731) is the July 31 snapshot of DeepSeek V4 Flash, a cost-efficient general-purpose chat model with a 1M token context window.",
contextLength: 1_048_576,
maxOutputTokens: 65_536,
created: "2026-07-31T00:00:00.000Z",
modality: { inputs: ["text"], outputs: ["text"] },
tokenizer: "DeepSeek",
},
} satisfies Record<string, ModelConfig>;

export type DeepSeekV4ModelName = keyof typeof models;
4 changes: 4 additions & 0 deletions packages/cost/models/authors/deepseek/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ import type { ModelConfig, ModelProviderConfig } from "../../types";
// Import models
import { models as r1Models } from "./r1-distill/models";
import { models as v3Models } from "./deepseek-v3/model";
import { models as v4Models } from "./deepseek-v4/models";
import { models as reasonerModels } from "./deepseek-reasoner/model";

// Import endpoints
import { endpoints as r1Endpoints } from "./r1-distill/endpoints";
import { endpoints as v3Endpoints } from "./deepseek-v3/endpoints";
import { endpoints as v4Endpoints } from "./deepseek-v4/endpoints";
import { endpoints as reasonerEndpoints } from "./deepseek-reasoner/endpoints";

// Aggregate models
export const deepseekModels = {
...r1Models,
...v3Models,
...v4Models,
...reasonerModels,
} satisfies Record<string, ModelConfig>;

// Aggregate endpoints
export const deepseekEndpointConfig = {
...r1Endpoints,
...v3Endpoints,
...v4Endpoints,
...reasonerEndpoints,
} satisfies Record<string, ModelProviderConfig>;
4 changes: 4 additions & 0 deletions packages/cost/models/authors/moonshotai/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ import type { ModelConfig, ModelProviderConfig } from "../../types";
// Import models
import { models as kimiK2Models } from "./kimi-k2/models";
import { models as kimiK25Models } from "./kimi-k2.5/models";
import { models as kimiK3Models } from "./kimi-k3/models";

// Import endpoints
import { endpoints as kimiK2Endpoints } from "./kimi-k2/endpoints";
import { endpoints as kimiK25Endpoints } from "./kimi-k2.5/endpoints";
import { endpoints as kimiK3Endpoints } from "./kimi-k3/endpoints";

// Aggregate models
export const moonshotaiModels = {
...kimiK2Models,
...kimiK25Models,
...kimiK3Models,
} satisfies Record<string, ModelConfig>;

// Aggregate endpoints
export const moonshotaiEndpointConfig = {
...kimiK2Endpoints,
...kimiK25Endpoints,
...kimiK3Endpoints,
} satisfies Record<string, ModelProviderConfig>;
79 changes: 79 additions & 0 deletions packages/cost/models/authors/moonshotai/kimi-k3/endpoints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { ModelProviderName } from "../../../providers";
import type { ModelProviderConfig } from "../../../types";
import { KimiK3ModelName } from "./models";

export const endpoints = {
"kimi-k3:engy": {
providerModelId: "kimi-k3",
provider: "engy",
author: "moonshotai",
pricing: [
{
threshold: 0,
input: 0.00000195, // $1.95/1M
output: 0.00000975, // $9.75/1M
cacheMultipliers: {
cachedInput: 0.1, // $0.195/1M cache read (10% of input)
},
},
],
contextLength: 1_113_088,
maxCompletionTokens: 16_384,
supportedParameters: [
"max_tokens",
"temperature",
"top_p",
"stop",
"stream",
"frequency_penalty",
"presence_penalty",
"seed",
"tools",
"tool_choice",
"response_format",
],
ptbEnabled: false,
endpointConfigs: {
"*": {},
},
},
"kimi-k3.1-pro:engy": {
providerModelId: "kimi-k3.1-pro",
provider: "engy",
author: "moonshotai",
pricing: [
{
threshold: 0,
input: 0.0000014, // $1.40/1M
output: 0.000007, // $7.00/1M
cacheMultipliers: {
cachedInput: 0.1, // $0.14/1M cache read (10% of input)
},
},
],
contextLength: 1_113_088,
maxCompletionTokens: 16_384,
supportedParameters: [
"max_tokens",
"temperature",
"top_p",
"stop",
"stream",
"frequency_penalty",
"presence_penalty",
"seed",
"tools",
"tool_choice",
"response_format",
],
ptbEnabled: false,
endpointConfigs: {
"*": {},
},
},
} satisfies Partial<
Record<
`${KimiK3ModelName}:${ModelProviderName}` | KimiK3ModelName,
ModelProviderConfig
>
>;
28 changes: 28 additions & 0 deletions packages/cost/models/authors/moonshotai/kimi-k3/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { ModelConfig } from "../../../types";

export const models = {
"kimi-k3": {
name: "Kimi K3",
author: "moonshotai",
description:
"Kimi K3 is Moonshot AI's flagship multimodal model with a 1.1M token context window, unifying vision and text understanding with strong reasoning, coding, and agentic capabilities.",
contextLength: 1_113_088,
maxOutputTokens: 16_384,
created: "2026-09-01T00:00:00.000Z",
modality: { inputs: ["text", "image"], outputs: ["text"] },
tokenizer: "MoonshotAI",
},
"kimi-k3.1-pro": {
name: "Kimi K3.1 Pro",
author: "moonshotai",
description:
"Kimi K3.1 Pro (moonshotai/Kimi-K3.1-Pro) is Moonshot AI's flagship multimodal model with a 1.1M token context window, unifying text, image, and video understanding with strong reasoning, coding, and agentic capabilities.",
contextLength: 1_113_088,
maxOutputTokens: 16_384,
created: "2026-11-01T00:00:00.000Z",
modality: { inputs: ["text", "image", "video"], outputs: ["text"] },
tokenizer: "MoonshotAI",
},
} satisfies Record<string, ModelConfig>;

export type KimiK3ModelName = keyof typeof models;
Loading