diff --git a/packages/core/test/nebius.test.ts b/packages/core/test/nebius.test.ts new file mode 100644 index 000000000..169c1bb46 --- /dev/null +++ b/packages/core/test/nebius.test.ts @@ -0,0 +1,133 @@ +import { expect, test } from "bun:test"; +import path from "node:path"; + +import { generate } from "../src/index.js"; + +const modelIDs = [ + "MiniMaxAI/MiniMax-M2.5", + "MiniMaxAI/MiniMax-M2.5-fast", + "NousResearch/Hermes-4-405B", + "NousResearch/Hermes-4-70B", + "PrimeIntellect/INTELLECT-3", + "Qwen/Qwen2.5-VL-72B-Instruct", + "Qwen/Qwen3-235B-A22B-Instruct-2507", + "Qwen/Qwen3-235B-A22B-Thinking-2507-fast", + "Qwen/Qwen3-30B-A3B-Instruct-2507", + "Qwen/Qwen3-32B", + "Qwen/Qwen3-Embedding-8B", + "Qwen/Qwen3-Next-80B-A3B-Thinking", + "Qwen/Qwen3-Next-80B-A3B-Thinking-fast", + "Qwen/Qwen3.5-397B-A17B", + "Qwen/Qwen3.5-397B-A17B-fast", + "deepseek-ai/DeepSeek-V3.2", + "deepseek-ai/DeepSeek-V3.2-fast", + "deepseek-ai/DeepSeek-V4-Pro", + "google/gemma-3-27b-it", + "meta-llama/Llama-3.3-70B-Instruct", + "moonshotai/Kimi-K2.5", + "moonshotai/Kimi-K2.5-fast", + "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1", + "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B", + "nvidia/Nemotron-3-Nano-Omni", + "nvidia/nemotron-3-super-120b-a12b", + "openai/gpt-oss-120b", + "openai/gpt-oss-120b-fast", + "zai-org/GLM-5", +].sort(); + +const unresolvedReasoning = [ + "MiniMaxAI/MiniMax-M2.5", + "MiniMaxAI/MiniMax-M2.5-fast", + "NousResearch/Hermes-4-405B", + "NousResearch/Hermes-4-70B", + "Qwen/Qwen3-235B-A22B-Thinking-2507-fast", + "Qwen/Qwen3-Next-80B-A3B-Thinking", + "Qwen/Qwen3-Next-80B-A3B-Thinking-fast", + "deepseek-ai/DeepSeek-V3.2", + "deepseek-ai/DeepSeek-V3.2-fast", + "deepseek-ai/DeepSeek-V4-Pro", + "moonshotai/Kimi-K2.5", + "moonshotai/Kimi-K2.5-fast", + "nvidia/Nemotron-3-Nano-Omni", + "nvidia/nemotron-3-super-120b-a12b", +].sort(); + +const deprecated = [ + "MiniMaxAI/MiniMax-M2.5-fast", + "PrimeIntellect/INTELLECT-3", + "Qwen/Qwen3-235B-A22B-Thinking-2507-fast", + "Qwen/Qwen3-Next-80B-A3B-Thinking-fast", + "Qwen/Qwen3.5-397B-A17B-fast", + "deepseek-ai/DeepSeek-V3.2", + "deepseek-ai/DeepSeek-V3.2-fast", + "moonshotai/Kimi-K2.5", + "moonshotai/Kimi-K2.5-fast", + "openai/gpt-oss-120b-fast", + "zai-org/GLM-5", +].sort(); + +test("generated Nebius provider matches the reviewed model matrix", async () => { + const root = path.join(import.meta.dirname, "..", "..", ".."); + const providers = await generate(path.join(root, "providers")); + const models = providers.nebius?.models; + expect(models).toBeDefined(); + if (models === undefined) throw new Error("Nebius provider was not generated"); + + expect(Object.keys(models).sort()).toEqual(modelIDs); + expect(models).not.toHaveProperty("meta-llama/Meta-Llama-3.1-8B-Instruct"); + expect(models).not.toHaveProperty("google/gemma-2-2b-it"); + + const verifiedControls = Object.fromEntries( + Object.entries(models) + .filter(([, model]) => model.reasoning_options !== undefined) + .map(([id, model]) => [id, model.reasoning_options]), + ); + expect(verifiedControls).toEqual({ + "Qwen/Qwen3.5-397B-A17B": [{ type: "toggle" }], + "Qwen/Qwen3.5-397B-A17B-fast": [{ type: "toggle" }], + "openai/gpt-oss-120b": [ + { type: "effort", values: ["low", "medium", "high"] }, + ], + "openai/gpt-oss-120b-fast": [ + { type: "effort", values: ["low", "medium", "high"] }, + ], + "zai-org/GLM-5": [{ type: "toggle" }], + }); + + expect( + Object.entries(models) + .filter(([, model]) => model.reasoning && model.reasoning_options === undefined) + .map(([id]) => id) + .sort(), + ).toEqual(unresolvedReasoning); + expect( + Object.entries(models) + .filter(([, model]) => model.reasoning_options?.length === 0) + .map(([id]) => id), + ).toEqual([]); + expect( + Object.entries(models) + .filter(([, model]) => !model.reasoning && model.reasoning_options !== undefined) + .map(([id]) => id), + ).toEqual([]); + expect( + Object.entries(models) + .filter(([, model]) => model.status === "deprecated") + .map(([id]) => id) + .sort(), + ).toEqual(deprecated); + + expect(models["openai/gpt-oss-120b-fast"]?.reasoning_options).toEqual( + models["openai/gpt-oss-120b"]?.reasoning_options, + ); + expect(models["Qwen/Qwen3.5-397B-A17B-fast"]?.reasoning_options).toEqual( + models["Qwen/Qwen3.5-397B-A17B"]?.reasoning_options, + ); + expect(models["deepseek-ai/DeepSeek-V4-Pro"]).toMatchObject({ + id: "deepseek-ai/DeepSeek-V4-Pro", + name: "DeepSeek V4 Pro", + reasoning: true, + }); + expect(models["deepseek-ai/DeepSeek-V4-Pro"]).not.toHaveProperty("base_model"); + expect(models["deepseek-ai/DeepSeek-V4-Pro"]?.reasoning_options).toBeUndefined(); +}); diff --git a/providers/nebius/models/MiniMaxAI/MiniMax-M2.5-fast.toml b/providers/nebius/models/MiniMaxAI/MiniMax-M2.5-fast.toml index 666c5c0fb..ecb315de0 100644 --- a/providers/nebius/models/MiniMaxAI/MiniMax-M2.5-fast.toml +++ b/providers/nebius/models/MiniMaxAI/MiniMax-M2.5-fast.toml @@ -1,6 +1,7 @@ name = "MiniMax-M2.5-fast" attachment = false reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/NousResearch/Hermes-4-405B.toml b/providers/nebius/models/NousResearch/Hermes-4-405B.toml index 728ad3080..a12ab2fbe 100644 --- a/providers/nebius/models/NousResearch/Hermes-4-405B.toml +++ b/providers/nebius/models/NousResearch/Hermes-4-405B.toml @@ -26,4 +26,4 @@ input = ["text"] output = ["text"] [interleaved] -field = "reasoning_content" \ No newline at end of file +field = "reasoning_content" diff --git a/providers/nebius/models/NousResearch/Hermes-4-70B.toml b/providers/nebius/models/NousResearch/Hermes-4-70B.toml index 7080f0827..309e99d89 100644 --- a/providers/nebius/models/NousResearch/Hermes-4-70B.toml +++ b/providers/nebius/models/NousResearch/Hermes-4-70B.toml @@ -26,4 +26,4 @@ input = ["text"] output = ["text"] [interleaved] -field = "reasoning_content" \ No newline at end of file +field = "reasoning_content" diff --git a/providers/nebius/models/PrimeIntellect/INTELLECT-3.toml b/providers/nebius/models/PrimeIntellect/INTELLECT-3.toml index 743b1edb1..d2de6f510 100644 --- a/providers/nebius/models/PrimeIntellect/INTELLECT-3.toml +++ b/providers/nebius/models/PrimeIntellect/INTELLECT-3.toml @@ -1,6 +1,7 @@ name = "INTELLECT-3" attachment = false reasoning = false +status = "deprecated" tool_call = true structured_output = true temperature = true @@ -22,4 +23,4 @@ output = 8_192 [modalities] input = ["text"] -output = ["text"] \ No newline at end of file +output = ["text"] diff --git a/providers/nebius/models/Qwen/Qwen3-235B-A22B-Instruct-2507.toml b/providers/nebius/models/Qwen/Qwen3-235B-A22B-Instruct-2507.toml index 5ef8658fc..7ced37cf1 100644 --- a/providers/nebius/models/Qwen/Qwen3-235B-A22B-Instruct-2507.toml +++ b/providers/nebius/models/Qwen/Qwen3-235B-A22B-Instruct-2507.toml @@ -3,7 +3,7 @@ family = "qwen" release_date = "2025-07-25" last_updated = "2025-10-04" attachment = false -reasoning = true +reasoning = false temperature = true knowledge = "2025-07" tool_call = true diff --git a/providers/nebius/models/Qwen/Qwen3-235B-A22B-Thinking-2507-fast.toml b/providers/nebius/models/Qwen/Qwen3-235B-A22B-Thinking-2507-fast.toml index 8ee0db949..cb2cfd9fd 100644 --- a/providers/nebius/models/Qwen/Qwen3-235B-A22B-Thinking-2507-fast.toml +++ b/providers/nebius/models/Qwen/Qwen3-235B-A22B-Thinking-2507-fast.toml @@ -1,6 +1,7 @@ name = "Qwen3-235B-A22B-Thinking-2507-fast" attachment = false reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking-fast.toml b/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking-fast.toml index dc4f905ab..30e340dfd 100644 --- a/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking-fast.toml +++ b/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking-fast.toml @@ -1,6 +1,7 @@ name = "Qwen3-Next-80B-A3B-Thinking-fast" attachment = false reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking.toml b/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking.toml index ca0b79132..9fb4fa80f 100644 --- a/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking.toml +++ b/providers/nebius/models/Qwen/Qwen3-Next-80B-A3B-Thinking.toml @@ -26,4 +26,4 @@ input = ["text"] output = ["text"] [interleaved] -field = "reasoning_content" \ No newline at end of file +field = "reasoning_content" diff --git a/providers/nebius/models/Qwen/Qwen3.5-397B-A17B-fast.toml b/providers/nebius/models/Qwen/Qwen3.5-397B-A17B-fast.toml index 9d17f88dd..0bb3885a9 100644 --- a/providers/nebius/models/Qwen/Qwen3.5-397B-A17B-fast.toml +++ b/providers/nebius/models/Qwen/Qwen3.5-397B-A17B-fast.toml @@ -1,6 +1,8 @@ name = "Qwen3.5-397B-A17B-fast" attachment = false reasoning = true +reasoning_options = [{ type = "toggle" }] +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/Qwen/Qwen3.5-397B-A17B.toml b/providers/nebius/models/Qwen/Qwen3.5-397B-A17B.toml index f84ebf4d8..d007e174e 100644 --- a/providers/nebius/models/Qwen/Qwen3.5-397B-A17B.toml +++ b/providers/nebius/models/Qwen/Qwen3.5-397B-A17B.toml @@ -1,6 +1,7 @@ name = "Qwen3.5-397B-A17B" attachment = false reasoning = true +reasoning_options = [{ type = "toggle" }] tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/deepseek-ai/DeepSeek-V3.2-fast.toml b/providers/nebius/models/deepseek-ai/DeepSeek-V3.2-fast.toml index 027b3e115..9aff42d93 100644 --- a/providers/nebius/models/deepseek-ai/DeepSeek-V3.2-fast.toml +++ b/providers/nebius/models/deepseek-ai/DeepSeek-V3.2-fast.toml @@ -1,6 +1,7 @@ name = "DeepSeek-V3.2-fast" attachment = false reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/deepseek-ai/DeepSeek-V3.2.toml b/providers/nebius/models/deepseek-ai/DeepSeek-V3.2.toml index 147a25262..acda35bee 100644 --- a/providers/nebius/models/deepseek-ai/DeepSeek-V3.2.toml +++ b/providers/nebius/models/deepseek-ai/DeepSeek-V3.2.toml @@ -1,6 +1,7 @@ name = "DeepSeek-V3.2" attachment = false reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true @@ -26,4 +27,4 @@ input = ["text"] output = ["text"] [interleaved] -field = "reasoning_content" \ No newline at end of file +field = "reasoning_content" diff --git a/providers/nebius/models/google/gemma-2-2b-it.toml b/providers/nebius/models/google/gemma-2-2b-it.toml deleted file mode 100644 index f5e60c4ed..000000000 --- a/providers/nebius/models/google/gemma-2-2b-it.toml +++ /dev/null @@ -1,25 +0,0 @@ -name = "Gemma-2-2b-it" -attachment = false -reasoning = false -tool_call = false -structured_output = false -temperature = true -knowledge = "2024-06" -release_date = "2024-07-31" -last_updated = "2026-02-04" -open_weights = true - -[cost] -input = 0.02 -output = 0.06 -cache_read = 0.002 -cache_write = 0.025 - -[limit] -context = 8_192 -input = 8_000 -output = 4_096 - -[modalities] -input = ["text"] -output = ["text"] \ No newline at end of file diff --git a/providers/nebius/models/meta-llama/Meta-Llama-3.1-8B-Instruct.toml b/providers/nebius/models/meta-llama/Meta-Llama-3.1-8B-Instruct.toml deleted file mode 100644 index ddb722a68..000000000 --- a/providers/nebius/models/meta-llama/Meta-Llama-3.1-8B-Instruct.toml +++ /dev/null @@ -1,25 +0,0 @@ -name = "Meta-Llama-3.1-8B-Instruct" -attachment = false -reasoning = false -tool_call = true -structured_output = true -temperature = true -knowledge = "2024-12" -release_date = "2024-07-23" -last_updated = "2026-02-04" -open_weights = true - -[cost] -input = 0.02 -output = 0.06 -cache_read = 0.002 -cache_write = 0.025 - -[limit] -context = 128_000 -input = 120_000 -output = 4_096 - -[modalities] -input = ["text"] -output = ["text"] \ No newline at end of file diff --git a/providers/nebius/models/moonshotai/Kimi-K2.5-fast.toml b/providers/nebius/models/moonshotai/Kimi-K2.5-fast.toml index 6ac99aa62..6f8a01495 100644 --- a/providers/nebius/models/moonshotai/Kimi-K2.5-fast.toml +++ b/providers/nebius/models/moonshotai/Kimi-K2.5-fast.toml @@ -4,6 +4,7 @@ release_date = "2025-12-15" last_updated = "2026-02-04" attachment = true reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/moonshotai/Kimi-K2.5.toml b/providers/nebius/models/moonshotai/Kimi-K2.5.toml index 2e5e0747b..d60bf396e 100644 --- a/providers/nebius/models/moonshotai/Kimi-K2.5.toml +++ b/providers/nebius/models/moonshotai/Kimi-K2.5.toml @@ -4,6 +4,7 @@ release_date = "2025-12-15" last_updated = "2026-02-04" attachment = true reasoning = true +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/openai/gpt-oss-120b-fast.toml b/providers/nebius/models/openai/gpt-oss-120b-fast.toml index 660a3a101..5cebac08c 100644 --- a/providers/nebius/models/openai/gpt-oss-120b-fast.toml +++ b/providers/nebius/models/openai/gpt-oss-120b-fast.toml @@ -1,6 +1,8 @@ name = "gpt-oss-120b-fast" attachment = false reasoning = true +reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }] +status = "deprecated" tool_call = true structured_output = true temperature = true diff --git a/providers/nebius/models/openai/gpt-oss-120b.toml b/providers/nebius/models/openai/gpt-oss-120b.toml index 2e61d87f2..c73b1027e 100644 --- a/providers/nebius/models/openai/gpt-oss-120b.toml +++ b/providers/nebius/models/openai/gpt-oss-120b.toml @@ -1,6 +1,7 @@ name = "gpt-oss-120b" attachment = false reasoning = true +reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }] tool_call = true structured_output = true temperature = true @@ -26,4 +27,4 @@ input = ["text"] output = ["text"] [interleaved] -field = "reasoning_content" \ No newline at end of file +field = "reasoning_content" diff --git a/providers/nebius/models/zai-org/GLM-5.toml b/providers/nebius/models/zai-org/GLM-5.toml index c2475bf92..099a4056c 100644 --- a/providers/nebius/models/zai-org/GLM-5.toml +++ b/providers/nebius/models/zai-org/GLM-5.toml @@ -1,6 +1,8 @@ name = "GLM-5" attachment = false reasoning = true +reasoning_options = [{ type = "toggle" }] +status = "deprecated" tool_call = true structured_output = true temperature = true