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
2 changes: 2 additions & 0 deletions packages/types/src/providers/featherless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const featherlessModels = {
contextWindow: 32678,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0,
outputPrice: 0,
description: "Kimi K2 Instruct model.",
Expand All @@ -49,6 +50,7 @@ export const featherlessModels = {
contextWindow: 32678,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0,
outputPrice: 0,
description: "Qwen3 Coder 480B A35B Instruct model.",
Expand Down
13 changes: 13 additions & 0 deletions packages/types/src/providers/fireworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const fireworksModels = {
contextWindow: 262144,
supportsImages: false,
supportsPromptCache: true,
supportsNativeTools: true,
inputPrice: 0.6,
outputPrice: 2.5,
cacheReadsPrice: 0.15,
Expand All @@ -34,6 +35,7 @@ export const fireworksModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.6,
outputPrice: 2.5,
description:
Expand All @@ -44,6 +46,7 @@ export const fireworksModels = {
contextWindow: 204800,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.3,
outputPrice: 1.2,
description:
Expand All @@ -54,6 +57,7 @@ export const fireworksModels = {
contextWindow: 256000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.22,
outputPrice: 0.88,
description: "Latest Qwen3 thinking model, competitive against the best closed source models in Jul 2025.",
Expand All @@ -63,6 +67,7 @@ export const fireworksModels = {
contextWindow: 256000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.45,
outputPrice: 1.8,
description: "Qwen3's most agentic code model to date.",
Expand All @@ -72,6 +77,7 @@ export const fireworksModels = {
contextWindow: 160000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 3,
outputPrice: 8,
description:
Expand All @@ -82,6 +88,7 @@ export const fireworksModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.9,
outputPrice: 0.9,
description:
Expand All @@ -92,6 +99,7 @@ export const fireworksModels = {
contextWindow: 163840,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.56,
outputPrice: 1.68,
description:
Expand All @@ -102,6 +110,7 @@ export const fireworksModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.55,
outputPrice: 2.19,
description:
Expand All @@ -112,6 +121,7 @@ export const fireworksModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.55,
outputPrice: 2.19,
description:
Expand All @@ -122,6 +132,7 @@ export const fireworksModels = {
contextWindow: 198000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.55,
outputPrice: 2.19,
description:
Expand All @@ -132,6 +143,7 @@ export const fireworksModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.07,
outputPrice: 0.3,
description:
Expand All @@ -142,6 +154,7 @@ export const fireworksModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.15,
outputPrice: 0.6,
description:
Expand Down
4 changes: 4 additions & 0 deletions packages/types/src/providers/io-intelligence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,31 @@ export const ioIntelligenceModels = {
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
description: "DeepSeek R1 reasoning model",
},
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
maxTokens: 8192,
contextWindow: 430000,
supportsImages: true,
supportsPromptCache: false,
supportsNativeTools: true,
description: "Llama 4 Maverick 17B model",
},
"Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar": {
maxTokens: 8192,
contextWindow: 106000,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
description: "Qwen3 Coder 480B specialized for coding",
},
"openai/gpt-oss-120b": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
description: "OpenAI GPT-OSS 120B model",
},
} as const satisfies Record<string, ModelInfo>
8 changes: 8 additions & 0 deletions packages/types/src/providers/sambanova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const sambaNovaModels = {
contextWindow: 16384,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.1,
outputPrice: 0.2,
description: "Meta Llama 3.1 8B Instruct model with 16K context window.",
Expand All @@ -30,6 +31,7 @@ export const sambaNovaModels = {
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.6,
outputPrice: 1.2,
description: "Meta Llama 3.3 70B Instruct model with 128K context window.",
Expand All @@ -40,6 +42,7 @@ export const sambaNovaModels = {
supportsImages: false,
supportsPromptCache: false,
supportsReasoningBudget: true,
supportsNativeTools: true,
inputPrice: 5.0,
outputPrice: 7.0,
description: "DeepSeek R1 reasoning model with 32K context window.",
Expand All @@ -49,6 +52,7 @@ export const sambaNovaModels = {
contextWindow: 32768,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 3.0,
outputPrice: 4.5,
description: "DeepSeek V3 model with 32K context window.",
Expand All @@ -58,6 +62,7 @@ export const sambaNovaModels = {
contextWindow: 32768,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 3.0,
outputPrice: 4.5,
description: "DeepSeek V3.1 model with 32K context window.",
Expand All @@ -76,6 +81,7 @@ export const sambaNovaModels = {
contextWindow: 131072,
supportsImages: true,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.63,
outputPrice: 1.8,
description: "Meta Llama 4 Maverick 17B 128E Instruct model with 128K context window.",
Expand All @@ -94,6 +100,7 @@ export const sambaNovaModels = {
contextWindow: 8192,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.4,
outputPrice: 0.8,
description: "Alibaba Qwen 3 32B model with 8K context window.",
Expand All @@ -103,6 +110,7 @@ export const sambaNovaModels = {
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 0.22,
outputPrice: 0.59,
description: "OpenAI gpt oss 120b model with 128k context window.",
Expand Down
2 changes: 2 additions & 0 deletions src/api/providers/__tests__/io-intelligence.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ describe("IOIntelligenceHandler", () => {
description: "Llama 4 Maverick 17B model",
supportsImages: true,
supportsPromptCache: false,
supportsNativeTools: true,
})
})

Expand All @@ -271,6 +272,7 @@ describe("IOIntelligenceHandler", () => {
description: "Llama 4 Maverick 17B model",
supportsImages: true,
supportsPromptCache: false,
supportsNativeTools: true,
})
})

Expand Down
9 changes: 7 additions & 2 deletions src/api/providers/featherless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { convertToR1Format } from "../transform/r1-format"
import { convertToOpenAiMessages } from "../transform/openai-format"
import { ApiStream } from "../transform/stream"

import type { ApiHandlerCreateMessageMetadata } from "../index"
import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"

export class FeatherlessHandler extends BaseOpenAiCompatibleProvider<FeatherlessModelId> {
Expand Down Expand Up @@ -49,7 +50,11 @@ export class FeatherlessHandler extends BaseOpenAiCompatibleProvider<Featherless
}
}

override async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream {
override async *createMessage(
systemPrompt: string,
messages: Anthropic.Messages.MessageParam[],
metadata?: ApiHandlerCreateMessageMetadata,
): ApiStream {
const model = this.getModel()

if (model.id.includes("DeepSeek-R1")) {
Expand Down Expand Up @@ -90,7 +95,7 @@ export class FeatherlessHandler extends BaseOpenAiCompatibleProvider<Featherless
yield processedChunk
}
} else {
yield* super.createMessage(systemPrompt, messages)
yield* super.createMessage(systemPrompt, messages, metadata)
}
}

Expand Down
Loading