Skip to content

Commit

Permalink
updated list of models
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 20, 2024
1 parent 0d394b9 commit d6da24c
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 40 deletions.
102 changes: 74 additions & 28 deletions packages/core/src/llms.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"detail": "OpenAI (or compatible)",
"bearerToken": true,
"aliases": {
"large": "openai:gpt-4o",
"small": "openai:gpt-4o-mini",
"vision": "openai:gpt-4o",
"embeddings": "openai:text-embedding-3-small",
"reasoning": "openai:o1",
"reasoning_small": "openai:o1-mini"
"large": "gpt-4o",
"small": "gpt-4o-mini",
"vision": "gpt-4o",
"embeddings": "text-embedding-3-small",
"reasoning": "o1",
"reasoning_small": "o1-mini"
}
},
{
Expand All @@ -24,11 +24,11 @@
"detail": "Azure AI OpenAI (serverless deployments)",
"bearerToken": false,
"aliases": {
"large": "azure_serverless:gpt-4o",
"small": "azure_serverless:gpt-4o-mini",
"vision": "azure_serverless:gpt-4o",
"reasoning": "azure_serverless:o1-preview",
"reasoning_small": "azure_serverless:o1-mini"
"large": "gpt-4o",
"small": "gpt-4o-mini",
"vision": "gpt-4o",
"reasoning": "o1",
"reasoning_small": "o1-mini"
}
},
{
Expand All @@ -44,9 +44,19 @@
"topLogprobs": false,
"prediction": false,
"aliases": {
"large": "anthropic:claude-2.1",
"small": "anthropic:claude-instant-1.2",
"vision": "anthropic:claude-2.1"
"large": "claude-3-5-sonnet-latest",
"small": "claude-3-5-haiku-latest"
}
},
{
"id": "anthropic_bedrock",
"detail": "Anthropic on AWS Bedrock models",
"logprobs": false,
"topLogprobs": false,
"prediction": false,
"aliases": {
"large": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"small": "anthropic.claude-3-5-haiku-20241022-v1:0"
}
},
{
Expand All @@ -58,9 +68,11 @@
"prediction": false,
"bearerToken": true,
"aliases": {
"large": "google:gemini-1.5-pro-latest",
"small": "google:gemini-1.5-flash-latest",
"vision": "google:gemini-1.5-flash-latest"
"large": "gemini-1.5-pro-latest",
"small": "gemini-1.5-flash-latest",
"vision": "gemini-1.5-pro-latest",
"reasoning": "gemini-2.0-flash-exp",
"embeddings": "text-embedding-004"
}
},
{
Expand All @@ -72,7 +84,12 @@
"id": "mistal",
"detail": "Mistral AI",
"prediction": false,
"bearerToken": true
"bearerToken": true,
"aliases": {
"large": "mistral-large-latest",
"small": "mistral-small-latest",
"vision": "pixtral-large-latest"
}
},
{
"id": "github",
Expand All @@ -83,20 +100,22 @@
"prediction": false,
"bearerToken": true,
"aliases": {
"large": "github:gpt-4o",
"small": "github:gpt-4o-mini",
"vision": "github:gpt-4o",
"embeddings": "github:text-embedding-3-small",
"reasoning": "github:o1-preview",
"reasoning_small": "github:o1-mini"
"large": "gpt-4o",
"small": "gpt-4o-mini",
"vision": "gpt-4o",
"embeddings": "text-embedding-3-small",
"reasoning": "o1-preview",
"reasoning_small": "o1-mini"
}
},
{
"id": "client",
"detail": "GitHub Copilot Chat Modes",
"aliases": {
"large": "client:gpt-4o",
"small": "client:gpt-4o-mini"
"large": "gpt-4o",
"small": "gpt-4o-mini",
"reasoning": "o1-preview",
"reasoning_small": "o1-mini"
}
},
{
Expand Down Expand Up @@ -127,7 +146,13 @@
"openaiCompatibility": "https://www.alibabacloud.com/help/en/model-studio/developer-reference/compatibility-of-openai-with-dashscope",
"tools": false,
"prediction": false,
"bearerToken": true
"bearerToken": true,
"aliases": {
"large": "qwen-max",
"small": "qwen-turbo",
"long": "qwen-plus",
"embeddings": "text-embedding-v3"
}
},
{
"id": "llamafile",
Expand All @@ -143,7 +168,8 @@
"aliases": {
"agent": "large",
"long": "large",
"memory": "large"
"memory": "large",
"reasoning_small": "reasoning"
},
"pricings": {
"openai:gpt-4o": {
Expand Down Expand Up @@ -546,6 +572,26 @@
"price_per_million_input_tokens": 3,
"price_per_million_output_tokens": 15,
"input_cache_token_rebate": 0.1
},
"anthropic:claude-3-5-sonnet-20241022": {
"price_per_million_input_tokens": 3,
"price_per_million_output_tokens": 15,
"input_cache_token_rebate": 0.1
},
"anthropic:claude-3-5-sonnet-latest": {
"price_per_million_input_tokens": 3,
"price_per_million_output_tokens": 15,
"input_cache_token_rebate": 0.1
},
"anthropic:claude-3-5-haiku-20241022": {
"price_per_million_input_tokens": 0.8,
"price_per_million_output_tokens": 4,
"input_cache_token_rebate": 0.1
},
"anthropic:claude-3-5-haiku-latest": {
"price_per_million_input_tokens": 0.8,
"price_per_million_output_tokens": 4,
"input_cache_token_rebate": 0.1
}
}
}
16 changes: 5 additions & 11 deletions packages/core/src/llms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,20 @@ export function defaultModelConfigurations(): ModelConfigurations {
...(Object.fromEntries(
aliases.map((alias) => [alias, readModelAlias(alias)])
) as ModelConfigurations),
...Object.fromEntries(
Object.entries(LLMS.aliases).map((kv) => [
kv[0],
{
model: kv[1],
source: "default",
} satisfies ModelConfiguration,
])
),
}
return structuredClone(res)

function readModelAlias(alias: string) {
const candidates = Object.values(LLMS.providers)
.map(({ aliases }) => (aliases as Record<string, string>)?.[alias])
.map(({ id, aliases }) => {
const ref = (aliases as Record<string, string>)?.[alias]
return ref ? `${id}:${ref}` : undefined
})
.filter((c) => !!c)
return deleteEmptyValues({
model: candidates[0],
source: "default",
candidates,
source: "default",
})
}
}
1 change: 0 additions & 1 deletion packages/core/src/vectorsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { resolveModelConnectionInfo } from "./models"
import { runtimeHost, host } from "./host"
import {
AZURE_OPENAI_API_VERSION,
DEFAULT_EMBEDDINGS_MODEL_CANDIDATES,
MODEL_PROVIDER_AZURE_OPENAI,
MODEL_PROVIDER_AZURE_SERVERLESS_MODELS,
MODEL_PROVIDER_AZURE_SERVERLESS_OPENAI,
Expand Down

0 comments on commit d6da24c

Please sign in to comment.