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
30 changes: 18 additions & 12 deletions packages/types/src/providers/baseten.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const basetenModels = {
contextWindow: 163_840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 2.55,
outputPrice: 5.95,
cacheWritesPrice: 0,
Expand All @@ -44,6 +45,7 @@ export const basetenModels = {
contextWindow: 163_840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 2.55,
outputPrice: 5.95,
cacheWritesPrice: 0,
Expand All @@ -55,6 +57,7 @@ export const basetenModels = {
contextWindow: 163_840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.77,
outputPrice: 0.77,
cacheWritesPrice: 0,
Expand All @@ -66,6 +69,7 @@ export const basetenModels = {
contextWindow: 163_840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.5,
outputPrice: 1.5,
cacheWritesPrice: 0,
Expand All @@ -86,11 +90,24 @@ export const basetenModels = {
description:
"DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance",
},
"openai/gpt-oss-120b": {
maxTokens: 16_384,
contextWindow: 128_072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.1,
outputPrice: 0.5,
cacheWritesPrice: 0,
cacheReadsPrice: 0,
description: "Extremely capable general-purpose LLM with strong, controllable reasoning capabilities",
},
"Qwen/Qwen3-235B-A22B-Instruct-2507": {
maxTokens: 16_384,
contextWindow: 262_144,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.22,
outputPrice: 0.8,
cacheWritesPrice: 0,
Expand All @@ -102,24 +119,13 @@ export const basetenModels = {
contextWindow: 262_144,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.38,
outputPrice: 1.53,
cacheWritesPrice: 0,
cacheReadsPrice: 0,
description: "Mixture-of-experts LLM with advanced coding and reasoning capabilities",
},
"openai/gpt-oss-120b": {
maxTokens: 16_384,
contextWindow: 128_072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.1,
outputPrice: 0.5,
cacheWritesPrice: 0,
cacheReadsPrice: 0,
description: "Extremely capable general-purpose LLM with strong, controllable reasoning capabilities",
},
"moonshotai/Kimi-K2-Instruct-0905": {
maxTokens: 16_384,
contextWindow: 262_000,
Expand Down
16 changes: 0 additions & 16 deletions packages/types/src/providers/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,22 +454,6 @@ export const bedrockModels = {
outputPrice: 0.6,
description: "Amazon Titan Text Express",
},
"amazon.titan-text-embeddings-v1:0": {
maxTokens: 8192,
contextWindow: 8_000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.1,
description: "Amazon Titan Text Embeddings",
},
"amazon.titan-text-embeddings-v2:0": {
maxTokens: 8192,
contextWindow: 8_000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.02,
description: "Amazon Titan Text Embeddings V2",
},
"moonshot.kimi-k2-thinking": {
maxTokens: 32_000,
contextWindow: 262_144,
Expand Down
5 changes: 4 additions & 1 deletion packages/types/src/providers/featherless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const featherlessModels = {
contextWindow: 32678,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0,
outputPrice: 0,
description: "DeepSeek V3 0324 model.",
Expand All @@ -22,6 +23,7 @@ export const featherlessModels = {
contextWindow: 32678,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0,
outputPrice: 0,
description: "DeepSeek R1 0528 model.",
Expand All @@ -41,6 +43,7 @@ export const featherlessModels = {
contextWindow: 32678,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0,
outputPrice: 0,
description: "GPT-OSS 120B model.",
Expand All @@ -57,4 +60,4 @@ export const featherlessModels = {
},
} as const satisfies Record<string, ModelInfo>

export const featherlessDefaultModelId: FeatherlessModelId = "deepseek-ai/DeepSeek-R1-0528"
export const featherlessDefaultModelId: FeatherlessModelId = "moonshotai/Kimi-K2-Instruct"
51 changes: 0 additions & 51 deletions packages/types/src/providers/groq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ export type GroqModelId =
| "llama-3.1-8b-instant"
| "llama-3.3-70b-versatile"
| "meta-llama/llama-4-scout-17b-16e-instruct"
| "meta-llama/llama-4-maverick-17b-128e-instruct"
| "mistral-saba-24b"
| "qwen-qwq-32b"
| "qwen/qwen3-32b"
| "deepseek-r1-distill-llama-70b"
| "moonshotai/kimi-k2-instruct"
| "moonshotai/kimi-k2-instruct-0905"
| "openai/gpt-oss-120b"
| "openai/gpt-oss-20b"
Expand Down Expand Up @@ -52,33 +47,6 @@ export const groqModels = {
outputPrice: 0.34,
description: "Meta Llama 4 Scout 17B Instruct model, 128K context.",
},
"meta-llama/llama-4-maverick-17b-128e-instruct": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.2,
outputPrice: 0.6,
description: "Meta Llama 4 Maverick 17B Instruct model, 128K context.",
},
"mistral-saba-24b": {
maxTokens: 8192,
contextWindow: 32768,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.79,
outputPrice: 0.79,
description: "Mistral Saba 24B model, 32K context.",
},
"qwen-qwq-32b": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.29,
outputPrice: 0.39,
description: "Alibaba Qwen QwQ 32B model, 128K context.",
},
"qwen/qwen3-32b": {
maxTokens: 8192,
contextWindow: 131072,
Expand All @@ -90,25 +58,6 @@ export const groqModels = {
outputPrice: 0.59,
description: "Alibaba Qwen 3 32B model, 128K context.",
},
"deepseek-r1-distill-llama-70b": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.75,
outputPrice: 0.99,
description: "DeepSeek R1 Distill Llama 70B model, 128K context.",
},
"moonshotai/kimi-k2-instruct": {
maxTokens: 16384,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: true,
inputPrice: 1.0,
outputPrice: 3.0,
cacheReadsPrice: 0.5, // 50% discount for cached input tokens
description: "Moonshot AI Kimi K2 Instruct 1T model, 128K context.",
},
"moonshotai/kimi-k2-instruct-0905": {
maxTokens: 16384,
contextWindow: 262144,
Expand Down
20 changes: 0 additions & 20 deletions packages/types/src/providers/sambanova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export type SambaNovaModelId =
| "DeepSeek-R1"
| "DeepSeek-V3-0324"
| "DeepSeek-V3.1"
| "DeepSeek-R1-Distill-Llama-70B"
| "Llama-4-Maverick-17B-128E-Instruct"
| "Llama-3.3-Swallow-70B-Instruct-v0.4"
| "Qwen3-32B"
| "gpt-oss-120b"

Expand Down Expand Up @@ -72,15 +70,6 @@ export const sambaNovaModels = {
outputPrice: 4.5,
description: "DeepSeek V3.1 model with 32K context window.",
},
"DeepSeek-R1-Distill-Llama-70B": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.7,
outputPrice: 1.4,
description: "DeepSeek R1 distilled Llama 70B model with 128K context window.",
},
"Llama-4-Maverick-17B-128E-Instruct": {
maxTokens: 8192,
contextWindow: 131072,
Expand All @@ -92,15 +81,6 @@ export const sambaNovaModels = {
outputPrice: 1.8,
description: "Meta Llama 4 Maverick 17B 128E Instruct model with 128K context window.",
},
"Llama-3.3-Swallow-70B-Instruct-v0.4": {
maxTokens: 8192,
contextWindow: 16384,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.6,
outputPrice: 1.2,
description: "Tokyotech Llama 3.3 Swallow 70B Instruct v0.4 model with 16K context window.",
},
"Qwen3-32B": {
maxTokens: 8192,
contextWindow: 8192,
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/providers/vercel-ai-gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const vercelAiGatewayDefaultModelInfo: ModelInfo = {
contextWindow: 200000,
supportsImages: true,
supportsPromptCache: true,
supportsNativeTools: true,
inputPrice: 3,
outputPrice: 15,
cacheWritesPrice: 3.75,
Expand Down
7 changes: 7 additions & 0 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ export const vertexModels = {
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.35,
outputPrice: 1.15,
description: "Meta Llama 4 Maverick 17B Instruct model, 128K context.",
Expand All @@ -486,6 +487,7 @@ export const vertexModels = {
contextWindow: 163_840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 1.35,
outputPrice: 5.4,
description: "DeepSeek R1 (0528). Available in us-central1",
Expand All @@ -495,6 +497,7 @@ export const vertexModels = {
contextWindow: 163_840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.6,
outputPrice: 1.7,
description: "DeepSeek V3.1. Available in us-west2",
Expand All @@ -504,6 +507,7 @@ export const vertexModels = {
contextWindow: 131_072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.15,
outputPrice: 0.6,
description: "OpenAI gpt-oss 120B. Available in us-central1",
Expand All @@ -513,6 +517,7 @@ export const vertexModels = {
contextWindow: 131_072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.075,
outputPrice: 0.3,
description: "OpenAI gpt-oss 20B. Available in us-central1",
Expand All @@ -522,6 +527,7 @@ export const vertexModels = {
contextWindow: 262_144,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 1.0,
outputPrice: 4.0,
description: "Qwen3 Coder 480B A35B Instruct. Available in us-south1",
Expand All @@ -531,6 +537,7 @@ export const vertexModels = {
contextWindow: 262_144,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.25,
outputPrice: 1.0,
description: "Qwen3 235B A22B Instruct. Available in us-south1",
Expand Down
12 changes: 9 additions & 3 deletions src/api/providers/__tests__/anthropic-vertex.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,8 @@ describe("VertexHandler", () => {
)
})

it("should not include tools when toolProtocol is xml", async () => {
it("should include tools even when toolProtocol is set to xml (user preference now ignored)", async () => {
// XML protocol deprecation: user preference is now ignored when model supports native tools
handler = new AnthropicVertexHandler({
apiModelId: "claude-3-5-sonnet-v2@20241022",
vertexProjectId: "test-project",
Expand Down Expand Up @@ -1241,9 +1242,14 @@ describe("VertexHandler", () => {
// Just consume
}

// Native is forced when supportsNativeTools===true, so tools should still be included
expect(mockCreate).toHaveBeenCalledWith(
expect.not.objectContaining({
tools: expect.anything(),
expect.objectContaining({
tools: expect.arrayContaining([
expect.objectContaining({
name: "get_weather",
}),
]),
}),
undefined,
)
Expand Down
13 changes: 9 additions & 4 deletions src/api/providers/__tests__/anthropic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ describe("AnthropicHandler", () => {
)
})

it("should not include tools when toolProtocol is xml", async () => {
// Create handler with xml tool protocol in options
it("should include tools even when toolProtocol is set to xml (user preference now ignored)", async () => {
// XML protocol deprecation: user preference is now ignored when model supports native tools
const xmlHandler = new AnthropicHandler({
...mockOptions,
toolProtocol: "xml",
Expand All @@ -468,9 +468,14 @@ describe("AnthropicHandler", () => {
// Just consume
}

// Native is forced when supportsNativeTools===true, so tools should still be included
expect(mockCreate).toHaveBeenCalledWith(
expect.not.objectContaining({
tools: expect.anything(),
expect.objectContaining({
tools: expect.arrayContaining([
expect.objectContaining({
name: "get_weather",
}),
]),
}),
expect.anything(),
)
Expand Down
Loading
Loading