Skip to content
Merged
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
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ When creating a new package in `packages/`, include these config files. Copy the
- Do not add explicit caching or memoization around `process.env` reads or parsed env-var values unless there is a measured hot-path need
- Exception: in `packages/models`, explicit duplication of model/provider mappings is acceptable and preferred over helper-based expansion. This is the only place in the repo where duplicating model definitions is OK. NEVER add helper functions (e.g. `makeModel(...)`/`makeProvider(...)`) that build model or provider definition objects, even when it means repeating fields across entries — write each model and provider mapping out in full as a plain object literal in the `models` array. Small shared `const` values are fine, but the definition objects themselves must not be constructed by a function.
- Models and provider mappings in `packages/models` can NEVER be removed, only deactivated. To retire a model or provider mapping, set `deactivatedAt: new Date("YYYY-MM-DD")` (today's date) on the relevant provider mapping(s) instead of deleting the definition. Historical usage records and analytics reference these definitions, so deleting them breaks lookups.
- In `packages/models`, ALWAYS express per-token prices (`inputPrice`, `outputPrice`, `cachedInputPrice`, and any other per-token price field) using `e-6` notation so the coefficient reads directly as USD per million tokens (e.g. `"1.4e-6"` for $1.40/M — the exact number providers publish). Never use `e-3` or other exponents for per-token prices. This does NOT apply to `requestPrice`, which is a flat USD amount charged per request (e.g. `"0.035"`), nor to `perSecondPrice`.
- No unnecessary code comments
- Do not use broad try/catch in API handlers unless to check for specific errors; instead, let errors propagate and be handled by the global error handler

Expand Down
50 changes: 38 additions & 12 deletions packages/models/src/models/bytedance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export const bytedanceModels = [
{
providerId: "bytedance",
externalId: "seed-1-6-250615",
inputPrice: "0.00025e-3",
outputPrice: "0.002e-3",
cachedInputPrice: "0.00005e-3",
inputPrice: "0.25e-6",
outputPrice: "2e-6",
cachedInputPrice: "0.05e-6",
requestPrice: "0",
contextSize: 256000,
maxOutput: undefined,
Expand All @@ -37,9 +37,9 @@ export const bytedanceModels = [
{
providerId: "bytedance",
externalId: "seed-1-6-250915",
inputPrice: "0.00025e-3",
cachedInputPrice: "0.00005e-3",
outputPrice: "0.002e-3",
inputPrice: "0.25e-6",
cachedInputPrice: "0.05e-6",
outputPrice: "2e-6",
requestPrice: "0",
contextSize: 256000,
maxOutput: undefined,
Expand All @@ -62,9 +62,9 @@ export const bytedanceModels = [
{
providerId: "bytedance",
externalId: "seed-1-6-flash-250715",
inputPrice: "0.00007e-3",
cachedInputPrice: "0.000015e-3",
outputPrice: "0.0003e-3",
inputPrice: "0.07e-6",
cachedInputPrice: "0.015e-6",
outputPrice: "0.3e-6",
requestPrice: "0",
contextSize: 256000,
maxOutput: undefined,
Expand All @@ -87,9 +87,9 @@ export const bytedanceModels = [
{
providerId: "bytedance",
externalId: "seed-1-8-251228",
inputPrice: "0.00025e-3",
cachedInputPrice: "0.00005e-3",
outputPrice: "0.002e-3",
inputPrice: "0.25e-6",
cachedInputPrice: "0.05e-6",
outputPrice: "2e-6",
requestPrice: "0",
contextSize: 256000,
maxOutput: undefined,
Expand Down Expand Up @@ -239,6 +239,32 @@ export const bytedanceModels = [
},
],
},
{
id: "glm-5-2",
name: "GLM-5.2 (260617)",
description:
"ByteDance-hosted GLM-5.2 flagship text model with tunable reasoning, strong coding, and 1M context for long-horizon tasks",
family: "bytedance",
releasedAt: new Date("2026-06-17"),
providers: [
{
providerId: "bytedance",
externalId: "glm-5-2-260617",
inputPrice: "1.4e-6",
cachedInputPrice: "0.26e-6",
outputPrice: "4.4e-6",
requestPrice: "0",
contextSize: 1024000,
maxOutput: 128000,
streaming: true,
reasoning: true,
vision: false,
tools: true,
jsonOutput: true,
healStreamingJsonOutput: true,
},
],
},
{
id: "seedream-4-5",
name: "Seedream 4.5",
Expand Down
32 changes: 32 additions & 0 deletions packages/models/src/models/deepseek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ export const deepseekModels = [
tools: true,
jsonOutput: true,
},
{
providerId: "bytedance",
externalId: "deepseek-v4-pro-260425",
inputPrice: "1.74e-6",
cachedInputPrice: "0.145e-6",
outputPrice: "3.48e-6",
requestPrice: "0",
contextSize: 1048576,
maxOutput: 393216,
streaming: true,
reasoning: true,
reasoningOutput: "omit" as const,
vision: false,
tools: true,
jsonOutput: false,
},
],
},
{
Expand Down Expand Up @@ -402,6 +418,22 @@ export const deepseekModels = [
tools: true,
jsonOutput: true,
},
{
providerId: "bytedance",
externalId: "deepseek-v4-flash-260425",
inputPrice: "0.14e-6",
cachedInputPrice: "0.028e-6",
outputPrice: "0.28e-6",
requestPrice: "0",
contextSize: 1048576,
maxOutput: 393216,
streaming: true,
reasoning: true,
reasoningOutput: "omit" as const,
vision: false,
tools: true,
jsonOutput: false,
},
],
},
] as const satisfies ModelDefinition[];
Loading