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
101 changes: 101 additions & 0 deletions packages/core/test/togetherai-generated.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import { expect, test } from "bun:test";
import path from "node:path";

import { generate } from "../src/index.js";

const expected = {
"LiquidAI/LFM2-24B-A2B": ["active", false, undefined],
"MiniMaxAI/MiniMax-M2.5": ["deprecated", true, undefined],
"MiniMaxAI/MiniMax-M2.7": ["active", true, []],
"Qwen/Qwen2.5-7B-Instruct-Turbo": ["active", false, undefined],
"Qwen/Qwen3-235B-A22B-Instruct-2507-tput": ["active", false, undefined],
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": ["deprecated", false, undefined],
"Qwen/Qwen3-Coder-Next-FP8": ["deprecated", false, undefined],
"Qwen/Qwen3.5-397B-A17B": ["active", true, [{ type: "toggle" }]],
"Qwen/Qwen3.5-9B": ["active", true, [{ type: "toggle" }]],
"Qwen/Qwen3.6-Plus": ["active", true, [{ type: "toggle" }]],
"Qwen/Qwen3.7-Max": ["active", false, undefined],
"deepcogito/cogito-v2-1-671b": ["active", true, [{ type: "toggle" }]],
"deepseek-ai/DeepSeek-R1": ["deprecated", true, []],
"deepseek-ai/DeepSeek-V3": ["deprecated", false, undefined],
"deepseek-ai/DeepSeek-V3-1": ["deprecated", true, [{ type: "toggle" }]],
"deepseek-ai/DeepSeek-V4-Pro": [
"active",
true,
[{ type: "toggle" }, { type: "effort", values: ["high", "max"] }],
],
"essentialai/Rnj-1-Instruct": ["active", false, undefined],
"google/gemma-3n-E4B-it": ["active", false, undefined],
"google/gemma-4-31B-it": ["active", true, undefined],
"meta-llama/Llama-3.3-70B-Instruct-Turbo": ["active", false, undefined],
"meta-llama/Meta-Llama-3-8B-Instruct-Lite": ["active", false, undefined],
"moonshotai/Kimi-K2.5": ["deprecated", true, [{ type: "toggle" }]],
"moonshotai/Kimi-K2.6": ["active", true, [{ type: "toggle" }]],
"nvidia/nemotron-3-ultra-550b-a55b": ["active", true, [{ type: "toggle" }]],
"openai/gpt-oss-120b": [
"active",
true,
[{ type: "effort", values: ["low", "medium", "high"] }],
],
"openai/gpt-oss-20b": [
"active",
true,
[{ type: "effort", values: ["low", "medium", "high"] }],
],
"pearl-ai/gemma-4-31b-it": ["active", true, undefined],
"zai-org/GLM-5": ["active", true, [{ type: "toggle" }]],
"zai-org/GLM-5.1": ["active", true, [{ type: "toggle" }]],
} as const;

test("generated Together matrix is exhaustive and resolved", async () => {
const root = path.join(import.meta.dirname, "..", "..", "..");
const providers = await generate(path.join(root, "providers"));
const models = providers.togetherai?.models;

expect(models).toBeDefined();
expect(Object.keys(models ?? {}).sort()).toEqual(Object.keys(expected).sort());

const active: string[] = [];
const deprecated: string[] = [];
const unresolved: string[] = [];
const fixed: string[] = [];

for (const [id, [lifecycle, reasoning, reasoningOptions]] of Object.entries(expected)) {
const model = models?.[id];
expect(model, id).toBeDefined();
expect(model?.status ?? "active", `${id} lifecycle`).toBe(lifecycle);
expect(model?.reasoning, `${id} reasoning`).toBe(reasoning);
expect(model?.reasoning_options, `${id} controls`).toEqual(reasoningOptions);

const encoded = JSON.stringify(model);
expect(encoded, `${id} resolved metadata`).not.toContain("base_model");

(lifecycle === "deprecated" ? deprecated : active).push(id);
if (reasoning && reasoningOptions === undefined) unresolved.push(id);
if (reasoningOptions?.length === 0) fixed.push(id);
if (!reasoning) expect(model?.reasoning_options, `${id} non-reasoning controls`).toBeUndefined();
}

expect(active).toHaveLength(22);
expect(deprecated).toHaveLength(7);
expect(unresolved.sort()).toEqual([
"MiniMaxAI/MiniMax-M2.5",
"google/gemma-4-31B-it",
"pearl-ai/gemma-4-31b-it",
]);
expect(fixed.sort()).toEqual([
"MiniMaxAI/MiniMax-M2.7",
"deepseek-ai/DeepSeek-R1",
]);

expect(models?.["deepseek-ai/DeepSeek-V4-Pro"]?.cost).toMatchObject({
input: 1.74,
output: 3.48,
cache_read: 0.2,
});
expect(models?.["google/gemma-4-31B-it"]).toMatchObject({
reasoning: true,
structured_output: true,
cost: { input: 0.39, output: 0.97 },
});
});
21 changes: 21 additions & 0 deletions providers/togetherai/models/LiquidAI/LFM2-24B-A2B.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name = "LFM2-24B-A2B"
family = "liquid"
release_date = "2026-02-25"
last_updated = "2026-02-25"
attachment = false
reasoning = false
temperature = true
tool_call = false
open_weights = true

[cost]
input = 0.03
output = 0.12

[limit]
context = 32_768
output = 32_768

[modalities]
input = ["text"]
output = ["text"]
1 change: 1 addition & 0 deletions providers/togetherai/models/MiniMaxAI/MiniMax-M2.5.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-02-12"
last_updated = "2026-02-12"
attachment = false
reasoning = true
status = "deprecated"
temperature = true
tool_call = true
open_weights = true
Expand Down
1 change: 1 addition & 0 deletions providers/togetherai/models/MiniMaxAI/MiniMax-M2.7.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-03-18"
last_updated = "2026-03-18"
attachment = false
reasoning = true
reasoning_options = []
temperature = true
tool_call = true
structured_output = true
Expand Down
22 changes: 22 additions & 0 deletions providers/togetherai/models/Qwen/Qwen2.5-7B-Instruct-Turbo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Qwen 2.5 7B Instruct Turbo"
family = "qwen"
release_date = "2024-09-19"
last_updated = "2024-09-19"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
open_weights = true

[cost]
input = 0.30
output = 0.30

[limit]
context = 32_768
output = 32_768

[modalities]
input = ["text"]
output = ["text"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ family = "qwen"
release_date = "2025-07-25"
last_updated = "2025-07-25"
attachment = false
reasoning = true
reasoning = false
temperature = true
knowledge = "2025-07"
tool_call = true
Expand All @@ -19,4 +19,4 @@ output = 262_144

[modalities]
input = ["text"]
output = ["text"]
output = ["text"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2025-07-23"
last_updated = "2025-07-23"
attachment = false
reasoning = false
status = "deprecated"
temperature = true
knowledge = "2025-04"
tool_call = true
Expand Down
3 changes: 2 additions & 1 deletion providers/togetherai/models/Qwen/Qwen3-Coder-Next-FP8.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ family = "qwen"
release_date = "2026-02-03"
last_updated = "2026-02-03"
attachment = false
reasoning = true
reasoning = false
status = "deprecated"
temperature = true
knowledge = "2026-02-03"
tool_call = true
Expand Down
1 change: 1 addition & 0 deletions providers/togetherai/models/Qwen/Qwen3.5-397B-A17B.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-02-16"
last_updated = "2026-02-16"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
open_weights = true
Expand Down
23 changes: 23 additions & 0 deletions providers/togetherai/models/Qwen/Qwen3.5-9B.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Qwen3.5 9B"
family = "qwen"
release_date = "2026-03-03"
last_updated = "2026-03-03"
attachment = true
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
open_weights = true

[cost]
input = 0.17
output = 0.25

[limit]
context = 262_144
output = 65_536

[modalities]
input = ["text", "image"]
output = ["text"]
1 change: 1 addition & 0 deletions providers/togetherai/models/Qwen/Qwen3.6-Plus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-04-30"
last_updated = "2026-04-30"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
open_weights = true
Expand Down
2 changes: 1 addition & 1 deletion providers/togetherai/models/Qwen/Qwen3.7-Max.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ family = "qwen"
release_date = "2026-05-21"
last_updated = "2026-05-21"
attachment = false
reasoning = true
reasoning = false
temperature = true
tool_call = true
open_weights = false
Expand Down
22 changes: 22 additions & 0 deletions providers/togetherai/models/deepcogito/cogito-v2-1-671b.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Cogito v2.1 671B"
family = "cogito"
release_date = "2025-11-13"
last_updated = "2025-11-13"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = false
open_weights = false

[cost]
input = 1.25
output = 1.25

[limit]
context = 163_840
output = 163_840

[modalities]
input = ["text"]
output = ["text"]
2 changes: 2 additions & 0 deletions providers/togetherai/models/deepseek-ai/DeepSeek-R1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ release_date = "2025-01-20"
last_updated = "2025-03-24"
attachment = false
reasoning = true
reasoning_options = []
status = "deprecated"
temperature = true
knowledge = "2024-07"
tool_call = false
Expand Down
2 changes: 2 additions & 0 deletions providers/togetherai/models/deepseek-ai/DeepSeek-V3-1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ release_date = "2025-08-21"
last_updated = "2025-08-21"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
status = "deprecated"
temperature = true
tool_call = true
knowledge = "2025-08"
Expand Down
3 changes: 2 additions & 1 deletion providers/togetherai/models/deepseek-ai/DeepSeek-V3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ family = "deepseek"
release_date = "2024-12-26"
last_updated = "2025-05-29"
attachment = false
reasoning = true
reasoning = false
status = "deprecated"
temperature = true
knowledge = "2024-07"
tool_call = true
Expand Down
5 changes: 3 additions & 2 deletions providers/togetherai/models/deepseek-ai/DeepSeek-V4-Pro.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-04-24"
last_updated = "2026-04-24"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }, { type = "effort", values = ["high", "max"] }]
structured_output = true
temperature = true
tool_call = true
Expand All @@ -13,8 +14,8 @@ open_weights = true
field = "reasoning_content"

[cost]
input = 2.10
output = 4.40
input = 1.74
output = 3.48
cache_read = 0.20

[limit]
Expand Down
22 changes: 22 additions & 0 deletions providers/togetherai/models/google/gemma-3n-E4B-it.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Gemma 3N E4B Instruct"
family = "gemma"
release_date = "2025-05-20"
last_updated = "2025-05-20"
attachment = false
reasoning = false
temperature = true
tool_call = false
structured_output = true
open_weights = true

[cost]
input = 0.06
output = 0.12

[limit]
context = 32_768
output = 32_768

[modalities]
input = ["text"]
output = ["text"]
5 changes: 3 additions & 2 deletions providers/togetherai/models/google/gemma-4-31B-it.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ release_date = "2026-04-07"
last_updated = "2026-04-07"
attachment = true
reasoning = true
structured_output = true
temperature = true
knowledge = "2025-01"
tool_call = true
open_weights = true

[cost]
input = 0.20
output = 0.50
input = 0.39
output = 0.97

[limit]
context = 262_144
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name = "Meta Llama 3 8B Instruct Lite"
family = "llama"
release_date = "2024-04-18"
last_updated = "2024-04-18"
attachment = false
reasoning = false
temperature = true
tool_call = false
open_weights = true

[cost]
input = 0.14
output = 0.14

[limit]
context = 8_192
output = 8_192

[modalities]
input = ["text"]
output = ["text"]
2 changes: 2 additions & 0 deletions providers/togetherai/models/moonshotai/Kimi-K2.5.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ release_date = "2026-01-27"
last_updated = "2026-01-27"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
status = "deprecated"
temperature = true
tool_call = true
knowledge = "2026-01"
Expand Down
1 change: 1 addition & 0 deletions providers/togetherai/models/moonshotai/Kimi-K2.6.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-04-21"
last_updated = "2026-04-21"
attachment = true
reasoning = true
reasoning_options = [{ type = "toggle" }]
structured_output = true
temperature = true
tool_call = true
Expand Down
Loading
Loading