Skip to content
Closed
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
33 changes: 30 additions & 3 deletions packages/core/script/generate-venice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,30 @@
import { z } from "zod";
import path from "node:path";
import { readdir } from "node:fs/promises";
import * as readline from "node:readline";
import { ModelFamilyValues } from "../src/family.js";

// Venice API endpoint
const API_ENDPOINT = "https://api.venice.ai/api/v1/models?type=text";

async function promptForApiKey(): Promise<string | null> {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});

return new Promise((resolve) => {
rl.question(
"Enter Venice API key to include alpha models (or press Enter to skip): ",
(answer) => {
rl.close();
Comment on lines +12 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are u updating other unrelated provider code?

const trimmed = answer.trim();
resolve(trimmed.length > 0 ? trimmed : null);
},
);
});
}

// Zod schemas for API response validation
const Capabilities = z
.object({
Expand Down Expand Up @@ -50,7 +69,6 @@ const ModelSpec = z
.object({
pricing: Pricing.optional(),
availableContextTokens: z.number(),
maxCompletionTokens: z.number().optional(),
capabilities: Capabilities,
constraints: z.any().optional(),
name: z.string(),
Expand Down Expand Up @@ -239,7 +257,11 @@ function mergeModel(
const caps = spec.capabilities;

const contextTokens = spec.availableContextTokens;
const outputTokens = spec.maxCompletionTokens ?? Math.floor(contextTokens / 4);
const proposedOutputTokens = Math.floor(contextTokens / 4);
const outputTokens =
existing?.limit?.output !== undefined && existing.limit.output < proposedOutputTokens
? existing.limit.output
: proposedOutputTokens

const openWeights = spec.modelSource
? spec.modelSource.toLowerCase().includes("huggingface")
Expand Down Expand Up @@ -465,7 +487,7 @@ async function main() {
"models",
);

// Check for API key from CLI argument or environment variable
// Check for API key from CLI argument, environment, or prompt
let apiKey: string | null = null;

// Check CLI args for --api-key=xxx or --api-key xxx
Expand All @@ -484,6 +506,11 @@ async function main() {
apiKey = process.env.VENICE_API_KEY ?? null;
}

// Prompt if still no key
if (!apiKey) {
apiKey = await promptForApiKey();
}

const includeAlpha = apiKey !== null;

if (dryRun) {
Expand Down
23 changes: 0 additions & 23 deletions providers/azure-cognitive-services/models/gpt-5.3-codex.toml

This file was deleted.

23 changes: 0 additions & 23 deletions providers/azure/models/gpt-5.3-codex.toml

This file was deleted.

8 changes: 8 additions & 0 deletions providers/brainiall/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions providers/brainiall/models/claude-3-haiku.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name = "Claude 3 Haiku"
release_date = "2024-03-13"
last_updated = "2024-03-13"
family = "claude-haiku"
attachment = true
reasoning = false
tool_call = true
open_weights = false
temperature = true
knowledge = "2023-08-31"

[cost]
input = 0.25
output = 1.25
cache_read = 0.03
cache_write = 0.30

[limit]
context = 200_000
output = 4_096

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
25 changes: 25 additions & 0 deletions providers/brainiall/models/claude-3.5-haiku.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name = "Claude 3.5 Haiku"
release_date = "2024-10-22"
last_updated = "2024-10-22"
family = "claude-haiku"
attachment = true
reasoning = false
tool_call = true
open_weights = false
structured_output = true
temperature = true
knowledge = "2024-07-31"

[cost]
input = 0.80
output = 4.00
cache_read = 0.08
cache_write = 1.00

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
25 changes: 25 additions & 0 deletions providers/brainiall/models/claude-haiku-4-5.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name = "Claude Haiku 4.5"
release_date = "2025-10-15"
last_updated = "2025-10-15"
family = "claude-haiku"
attachment = true
reasoning = true
tool_call = true
open_weights = false
structured_output = true
temperature = true
knowledge = "2025-02-28"

[cost]
input = 1.00
output = 5.00
cache_read = 0.10
cache_write = 1.25

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
25 changes: 25 additions & 0 deletions providers/brainiall/models/claude-opus-4-5.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name = "Claude Opus 4.5"
release_date = "2025-11-24"
last_updated = "2025-11-24"
family = "claude-opus"
attachment = true
reasoning = true
tool_call = true
open_weights = false
structured_output = true
temperature = true
knowledge = "2025-03-31"

[cost]
input = 5.00
output = 25.00
cache_read = 0.50
cache_write = 6.25

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name = "anthropic--claude-4.6-opus"
family = "claude-opus"
name = "Claude Opus 4.6"
release_date = "2026-02-05"
last_updated = "2026-02-05"
family = "claude-opus"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-05"
open_weights = false
structured_output = true
temperature = true
knowledge = "2025-05"

[cost]
input = 5.00
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name = "anthropic--claude-4.6-sonnet"
family = "claude-sonnet"
name = "Claude Sonnet 4.6"
release_date = "2026-02-17"
last_updated = "2026-02-17"
family = "claude-sonnet"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-08"
open_weights = false
structured_output = true
temperature = true
knowledge = "2025-08"

[cost]
input = 3.00
Expand Down
23 changes: 23 additions & 0 deletions providers/brainiall/models/command-r-plus.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Command R+"
release_date = "2024-04-04"
last_updated = "2024-04-04"
family = "command-r"
attachment = false
reasoning = false
tool_call = true
open_weights = true
structured_output = true
temperature = true
knowledge = "2024-04"

[cost]
input = 3.00
output = 15.00

[limit]
context = 128_000
output = 4_096

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/brainiall/models/deepseek-r1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "DeepSeek R1"
release_date = "2025-01-20"
last_updated = "2025-05-29"
family = "deepseek-thinking"
attachment = false
reasoning = true
tool_call = true
open_weights = true
structured_output = true
temperature = true
knowledge = "2024-07"

[cost]
input = 1.35
output = 5.40

[limit]
context = 128_000
output = 64_000

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/brainiall/models/deepseek-v3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "DeepSeek V3"
release_date = "2026-02-15"
last_updated = "2026-02-15"
family = "deepseek"
attachment = false
reasoning = true
tool_call = true
open_weights = true
structured_output = true
temperature = true
knowledge = "2024-07"

[cost]
input = 0.27
output = 1.10

[limit]
context = 128_000
output = 8_192

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/brainiall/models/devstral-2.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Devstral 2 123B"
release_date = "2025-12-09"
last_updated = "2025-12-09"
family = "devstral"
attachment = false
reasoning = false
tool_call = true
open_weights = true
structured_output = true
temperature = true
knowledge = "2025-12"

[cost]
input = 0.40
output = 1.60

[limit]
context = 262_144
output = 262_144

[modalities]
input = ["text"]
output = ["text"]
22 changes: 22 additions & 0 deletions providers/brainiall/models/gemma-3-27b.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Gemma 3 27B"
release_date = "2025-07-27"
last_updated = "2025-07-27"
family = "gemma"
attachment = true
reasoning = false
tool_call = true
open_weights = true
temperature = true
knowledge = "2025-07"

[cost]
input = 0.12
output = 0.20

[limit]
context = 202_752
output = 8_192

[modalities]
input = ["text", "image"]
output = ["text"]
Loading