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
75 changes: 41 additions & 34 deletions src/packages/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@google-cloud/bigquery": "^7.8.0",
"@google-cloud/compute": "^4.7.0",
"@google-cloud/monitoring": "^4.1.0",
"@google-cloud/storage": "^7.11.1",
"@google-cloud/storage": "^7.19.0",
"@google-cloud/storage-transfer": "^3.3.0",
"@isaacs/ttlcache": "^1.4.1",
"@langchain/anthropic": "^1.3.18",
Expand Down
13 changes: 13 additions & 0 deletions src/packages/util/db-schema/llm-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export const GOOGLE_MODELS = [
"gemini-2.0-flash-lite-8k",
"gemini-3-flash-preview-16k", // Preview model, context limited to 16k
"gemini-3-pro-preview-8k", // Preview model, context limited to 8k
"gemini-3.1-pro-preview-8k", // Preview model, context limited to 8k
] as const;
export type GoogleModel = (typeof GOOGLE_MODELS)[number];
export function isGoogleModel(model: unknown): model is GoogleModel {
Expand All @@ -197,6 +198,7 @@ const CANONICAL_GOOGLE_MODELS_THINKING = [
"gemini-2.5-pro",
"gemini-3-flash-preview",
"gemini-3-pro-preview",
"gemini-3.1-pro-preview",
] as const;

export type CanonicalGoogleModel = (typeof CANONICAL_GOOGLE_MODELS)[number];
Expand All @@ -220,6 +222,7 @@ export const GOOGLE_MODEL_TO_ID: Partial<{
"gemini-2.5-pro-8k": "gemini-2.5-pro",
"gemini-3-flash-preview-16k": "gemini-3-flash-preview",
"gemini-3-pro-preview-8k": "gemini-3-pro-preview",
"gemini-3.1-pro-preview-8k": "gemini-3.1-pro-preview",
} as const;

/**
Expand Down Expand Up @@ -359,6 +362,7 @@ export const USER_SELECTABLE_LLMS_BY_VENDOR: {
m === "gpt-5-mini-8k",
),
google: [
"gemini-3.1-pro-preview-8k",
"gemini-3-flash-preview-16k",
"gemini-3-pro-preview-8k",
"gemini-2.5-flash-8k",
Expand Down Expand Up @@ -875,6 +879,7 @@ export const LLM_USERNAMES: LLM2String = {
"gemini-2.5-flash-8k": "Gemini 2.5 Flash",
"gemini-2.5-pro-8k": "Gemini 2.5 Pro",
"gemini-3-pro-preview-8k": "Gemini 3 Pro",
"gemini-3.1-pro-preview-8k": "Gemini 3.1 Pro",
"mistral-small-latest": "Mistral AI Small",
"mistral-medium-latest": "Mistral AI Medium",
"mistral-large-latest": "Mistral AI Large",
Expand Down Expand Up @@ -967,6 +972,8 @@ export const LLM_DESCR: LLM2String = {
"Google's Gemini 2.5 Pro Generative AI model (8k token context)",
"gemini-3-pro-preview-8k":
"Google's Gemini 3 Pro Generative AI model (8k token context)",
"gemini-3.1-pro-preview-8k":
"Google's Gemini 3.1 Pro model with enhanced reasoning (8k token context)",
"mistral-small-latest":
"Small general purpose tasks, text classification, customer service. (Mistral AI, 4k token context)",
"mistral-medium-latest":
Expand Down Expand Up @@ -1299,6 +1306,12 @@ export const LLM_COST: { [name in LanguageModelCore]: Cost } = {
max_tokens: 8_000,
free: false,
},
"gemini-3.1-pro-preview-8k": {
prompt_tokens: usd1Mtokens(2),
completion_tokens: usd1Mtokens(12),
max_tokens: 8_000,
free: false,
},
// https://mistral.ai/technology/
"mistral-small-latest": {
prompt_tokens: usd1Mtokens(0.2),
Expand Down
5 changes: 5 additions & 0 deletions src/packages/util/db-schema/purchase-quotas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ export const QUOTA_SPEC: QuotaSpec = {
color: GOOGLE_AI_COLOR,
category: "ai",
},
"google-gemini-3.1-pro-preview-8k": {
display: LLM_USERNAMES["gemini-3.1-pro-preview-8k"],
color: GOOGLE_AI_COLOR,
category: "ai",
},
"xai-grok-4-1-fast-non-reasoning-16k": {
display: LLM_USERNAMES["grok-4-1-fast-non-reasoning-16k"],
color: XAI_COLOR,
Expand Down