diff --git a/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap b/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap index ab023ddc00..a27e1140bb 100644 --- a/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap +++ b/packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap @@ -5495,6 +5495,25 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = ` "*", ], }, + "gpt-5.1-codex:starveri": { + "context": 400000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.1-codex", + "parameters": [ + "max_completion_tokens", + "response_format", + "seed", + "stop", + "tool_choice", + "tools", + ], + "provider": "starveri", + "ptbEnabled": true, + "regions": [ + "*", + ], + }, "gpt-5.1:openai": { "context": 400000, "crossRegion": false, @@ -5752,6 +5771,46 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = ` ], }, }, + "openai/gpt-5.3-codex": { + "gpt-5.3-codex-spark:starveri": { + "context": 400000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.3-codex-spark", + "parameters": [ + "max_completion_tokens", + "response_format", + "seed", + "stop", + "tool_choice", + "tools", + ], + "provider": "starveri", + "ptbEnabled": true, + "regions": [ + "*", + ], + }, + "gpt-5.3-codex:starveri": { + "context": 400000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.3-codex", + "parameters": [ + "max_completion_tokens", + "response_format", + "seed", + "stop", + "tool_choice", + "tools", + ], + "provider": "starveri", + "ptbEnabled": true, + "regions": [ + "*", + ], + }, + }, "openai/gpt-5.4": { "gpt-5.4-2026-03-05:azure": { "context": 1050000, @@ -5842,6 +5901,29 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = ` "*", ], }, + "gpt-5.4-mini:starveri": { + "context": 1050000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.4-mini", + "parameters": [ + "logprobs", + "max_completion_tokens", + "response_format", + "seed", + "stop", + "temperature", + "tool_choice", + "tools", + "top_p", + "verbosity", + ], + "provider": "starveri", + "ptbEnabled": true, + "regions": [ + "*", + ], + }, "gpt-5.4:azure": { "context": 1050000, "crossRegion": false, @@ -5931,6 +6013,54 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = ` "*", ], }, + "gpt-5.4:starveri": { + "context": 1050000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.4", + "parameters": [ + "logprobs", + "max_completion_tokens", + "response_format", + "seed", + "stop", + "temperature", + "tool_choice", + "tools", + "top_p", + "verbosity", + ], + "provider": "starveri", + "ptbEnabled": true, + "regions": [ + "*", + ], + }, + }, + "openai/gpt-5.5": { + "gpt-5.5:starveri": { + "context": 1050000, + "crossRegion": false, + "maxTokens": 128000, + "modelId": "gpt-5.5", + "parameters": [ + "logprobs", + "max_completion_tokens", + "response_format", + "seed", + "stop", + "temperature", + "tool_choice", + "tools", + "top_p", + "verbosity", + ], + "provider": "starveri", + "ptbEnabled": true, + "regions": [ + "*", + ], + }, }, "openai/gpt-image-1": { "gpt-image-1.5:openai": { @@ -7634,6 +7764,7 @@ exports[`Registry Snapshots model coverage snapshot 1`] = ` "openrouter", "openrouter", "openrouter", + "starveri", ], "openai/gpt-5.2": [ "azure", @@ -7647,6 +7778,10 @@ exports[`Registry Snapshots model coverage snapshot 1`] = ` "openrouter", "openrouter", ], + "openai/gpt-5.3-codex": [ + "starveri", + "starveri", + ], "openai/gpt-5.4": [ "azure", "azure", @@ -7656,6 +7791,11 @@ exports[`Registry Snapshots model coverage snapshot 1`] = ` "openai", "openrouter", "openrouter", + "starveri", + "starveri", + ], + "openai/gpt-5.5": [ + "starveri", ], "openai/gpt-image-1": [ "openai", @@ -9609,6 +9749,17 @@ exports[`Registry Snapshots pricing snapshot 1`] = ` "web_search": 0.01, }, ], + "starveri": [ + { + "cacheMultipliers": { + "cachedInput": 0.1, + }, + "input": 4.166666666667e-7, + "output": 0.0000033333333333335, + "threshold": 0, + "web_search": 0.0033333333333333335, + }, + ], }, "openai/gpt-5.2": { "azure": [ @@ -9650,6 +9801,19 @@ exports[`Registry Snapshots pricing snapshot 1`] = ` }, ], }, + "openai/gpt-5.3-codex": { + "starveri": [ + { + "cacheMultipliers": { + "cachedInput": 0.01, + }, + "input": 3.333333333333e-7, + "output": 6.666666666666e-7, + "threshold": 0, + "web_search": 0.0033333333333333335, + }, + ], + }, "openai/gpt-5.4": { "azure": [ { @@ -9712,6 +9876,30 @@ exports[`Registry Snapshots pricing snapshot 1`] = ` "threshold": 272000, }, ], + "starveri": [ + { + "cacheMultipliers": { + "cachedInput": 0.1, + }, + "input": 2.5e-7, + "output": 0.0000011666666666667, + "threshold": 0, + "web_search": 0.0033333333333333335, + }, + ], + }, + "openai/gpt-5.5": { + "starveri": [ + { + "cacheMultipliers": { + "cachedInput": 0.1, + }, + "input": 8.333333333334e-7, + "output": 0.0000025, + "threshold": 0, + "web_search": 0.0033333333333333335, + }, + ], }, "openai/gpt-image-1": { "openai": [ @@ -10443,6 +10631,7 @@ exports[`Registry Snapshots verify registry state 1`] = ` "providers": [ "openai", "openrouter", + "starveri", ], }, { @@ -10477,6 +10666,18 @@ exports[`Registry Snapshots verify registry state 1`] = ` "openrouter", ], }, + { + "model": "gpt-5.3-codex", + "providers": [ + "starveri", + ], + }, + { + "model": "gpt-5.3-codex-spark", + "providers": [ + "starveri", + ], + }, { "model": "gpt-5.4", "providers": [ @@ -10484,6 +10685,7 @@ exports[`Registry Snapshots verify registry state 1`] = ` "helicone", "openai", "openrouter", + "starveri", ], }, { @@ -10495,6 +10697,18 @@ exports[`Registry Snapshots verify registry state 1`] = ` "openrouter", ], }, + { + "model": "gpt-5.4-mini", + "providers": [ + "starveri", + ], + }, + { + "model": "gpt-5.5", + "providers": [ + "starveri", + ], + }, { "model": "gpt-image-1", "providers": [ @@ -10921,6 +11135,10 @@ exports[`Registry Snapshots verify registry state 1`] = ` "modelCount": 5, "provider": "perplexity", }, + { + "modelCount": 6, + "provider": "starveri", + }, { "modelCount": 23, "provider": "vertex", @@ -10990,8 +11208,12 @@ exports[`Registry Snapshots verify registry state 1`] = ` "gpt-5.2", "gpt-5.2-chat-latest", "gpt-5.2-pro", + "gpt-5.3-codex", + "gpt-5.3-codex-spark", "gpt-5.4", "gpt-5.4-2026-03-05", + "gpt-5.4-mini", + "gpt-5.5", "gpt-oss-120b", "gpt-oss-20b", "grok-3", @@ -11049,9 +11271,9 @@ exports[`Registry Snapshots verify registry state 1`] = ` "claude-3.5-haiku:anthropic:*", ], "totalArchivedConfigs": 0, - "totalEndpoints": 329, - "totalModelProviderConfigs": 329, - "totalModelsWithPtb": 108, - "totalProviders": 21, + "totalEndpoints": 335, + "totalModelProviderConfigs": 335, + "totalModelsWithPtb": 112, + "totalProviders": 22, } `; diff --git a/packages/__tests__/cost/modelCostFromRegistry.test.ts b/packages/__tests__/cost/modelCostFromRegistry.test.ts index 73aa4f6602..98be21b3bf 100644 --- a/packages/__tests__/cost/modelCostFromRegistry.test.ts +++ b/packages/__tests__/cost/modelCostFromRegistry.test.ts @@ -56,6 +56,25 @@ describe("modelCostBreakdownFromRegistry", () => { } }); + it("should calculate cost for Starveri gpt-5.4 usage", () => { + const modelUsage: ModelUsage = { + input: 1_000_000, + output: 1_000_000, + }; + + const breakdown = modelCostBreakdownFromRegistry({ + modelUsage, + providerModelId: "gpt-5.4", + provider: "starveri" as ModelProviderName, + }); + + expect(breakdown).not.toBeNull(); + if (breakdown) { + // $0.33/1M input + $1.67/1M output + expect(breakdown.totalCost).toBeCloseTo(2.0, 10); + } + }); + it("should return null for non-existent model", () => { const modelUsage: ModelUsage = { input: 100, diff --git a/packages/cost/models/authors/openai/gpt-5.1/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.1/endpoints.ts index 00e83c7e27..aaa9c8a7e6 100644 --- a/packages/cost/models/authors/openai/gpt-5.1/endpoints.ts +++ b/packages/cost/models/authors/openai/gpt-5.1/endpoints.ts @@ -585,6 +585,47 @@ export const endpoints = { "*": {}, }, }, + "gpt-5.1-codex:starveri": { + providerModelId: "gpt-5.1-codex", + provider: "starveri", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.0000004166666666667, // $0.4167 per 1M tokens + output: 0.0000033333333333335, // $3.33 per 1M tokens + web_search: 0.0033333333333333335, // $3.33 per 1000 searches + cacheMultipliers: { + cachedInput: 0.1, // $0.0417 per 1M tokens + }, + }, + ], + contextLength: 400000, + maxCompletionTokens: 128000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + ], + unsupportedParameters: [ + "temperature", + "top_p", + "presence_penalty", + "frequency_penalty", + "logprobs", + "top_logprobs", + "logit_bias", + "max_tokens", + "verbosity", + ], + ptbEnabled: true, + endpointConfigs: { + "*": {}, + }, + }, } satisfies Partial< Record<`${GPT51ModelName}:${ModelProviderName}`, ModelProviderConfig> >; diff --git a/packages/cost/models/authors/openai/gpt-5.3-codex/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.3-codex/endpoints.ts new file mode 100644 index 0000000000..09bb41c385 --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.3-codex/endpoints.ts @@ -0,0 +1,90 @@ +import { ModelProviderName } from "../../../providers"; +import type { ModelProviderConfig } from "../../../types"; +import { GPT53CodexModelName } from "./models"; + +export const endpoints = { + "gpt-5.3-codex:starveri": { + providerModelId: "gpt-5.3-codex", + provider: "starveri", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.00000016666666666666, // $0.167 per 1M tokens + output: 0.0000003333333333333, // $0.33 per 1M tokens + web_search: 0.0033333333333333335, + cacheMultipliers: { + cachedInput: 0.1, // $0.0167 per 1M tokens + }, + }, + ], + contextLength: 400000, + maxCompletionTokens: 128000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + ], + unsupportedParameters: [ + "temperature", + "top_p", + "presence_penalty", + "frequency_penalty", + "logprobs", + "top_logprobs", + "logit_bias", + "max_tokens", + "verbosity", + ], + ptbEnabled: true, + endpointConfigs: { + "*": {}, + }, + }, + "gpt-5.3-codex-spark:starveri": { + providerModelId: "gpt-5.3-codex-spark", + provider: "starveri", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.0000003333333333333, // $0.33 per 1M tokens + output: 0.0000006666666666666, // $0.67 per 1M tokens + web_search: 0.0033333333333333335, + cacheMultipliers: { + cachedInput: 0.01, // $0.0033 per 1M tokens + }, + }, + ], + contextLength: 400000, + maxCompletionTokens: 128000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + ], + unsupportedParameters: [ + "temperature", + "top_p", + "presence_penalty", + "frequency_penalty", + "logprobs", + "top_logprobs", + "logit_bias", + "max_tokens", + "verbosity", + ], + ptbEnabled: true, + endpointConfigs: { + "*": {}, + }, + }, +} satisfies Partial< + Record<`${GPT53CodexModelName}:${ModelProviderName}`, ModelProviderConfig> +>; diff --git a/packages/cost/models/authors/openai/gpt-5.3-codex/models.ts b/packages/cost/models/authors/openai/gpt-5.3-codex/models.ts new file mode 100644 index 0000000000..e0f939d67d --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.3-codex/models.ts @@ -0,0 +1,26 @@ +import type { ModelConfig } from "../../../types"; + +export const models = { + "gpt-5.3-codex": { + name: "OpenAI GPT-5.3 Codex", + author: "openai", + description: "Codex model based on GPT-5.3 for code generation and analysis.", + contextLength: 400000, + maxOutputTokens: 128000, + created: "2026-01-01T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + }, + "gpt-5.3-codex-spark": { + name: "OpenAI GPT-5.3 Codex Spark", + author: "openai", + description: "Lower-latency Codex variant based on GPT-5.3.", + contextLength: 400000, + maxOutputTokens: 128000, + created: "2026-01-01T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + }, +} satisfies Record; + +export type GPT53CodexModelName = keyof typeof models; diff --git a/packages/cost/models/authors/openai/gpt-5.4/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.4/endpoints.ts index fa62d6f8fb..5c27c12c66 100644 --- a/packages/cost/models/authors/openai/gpt-5.4/endpoints.ts +++ b/packages/cost/models/authors/openai/gpt-5.4/endpoints.ts @@ -365,6 +365,88 @@ export const endpoints = { "*": {}, }, }, + "gpt-5.4:starveri": { + providerModelId: "gpt-5.4", + provider: "starveri", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.0000003333333333333, // $0.33 per 1M tokens + output: 0.0000016666666666667, // $1.67 per 1M tokens + web_search: 0.0033333333333333335, + cacheMultipliers: { + cachedInput: 0.1, // $0.033 per 1M tokens + }, + }, + ], + contextLength: 1_050_000, + maxCompletionTokens: 128_000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + "verbosity", + "temperature", + "top_p", + "logprobs", + ], + unsupportedParameters: [ + "presence_penalty", + "frequency_penalty", + "top_logprobs", + "logit_bias", + "max_tokens", + ], + ptbEnabled: true, + endpointConfigs: { + "*": {}, + }, + }, + "gpt-5.4-mini:starveri": { + providerModelId: "gpt-5.4-mini", + provider: "starveri", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.00000025, // $0.25 per 1M tokens + output: 0.0000011666666666667, // $1.17 per 1M tokens + web_search: 0.0033333333333333335, + cacheMultipliers: { + cachedInput: 0.1, // $0.025 per 1M tokens + }, + }, + ], + contextLength: 1_050_000, + maxCompletionTokens: 128_000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + "verbosity", + "temperature", + "top_p", + "logprobs", + ], + unsupportedParameters: [ + "presence_penalty", + "frequency_penalty", + "top_logprobs", + "logit_bias", + "max_tokens", + ], + ptbEnabled: true, + endpointConfigs: { + "*": {}, + }, + }, } satisfies Partial< Record<`${GPT54ModelName}:${ModelProviderName}`, ModelProviderConfig> >; diff --git a/packages/cost/models/authors/openai/gpt-5.4/models.ts b/packages/cost/models/authors/openai/gpt-5.4/models.ts index 9804697847..432112bd99 100644 --- a/packages/cost/models/authors/openai/gpt-5.4/models.ts +++ b/packages/cost/models/authors/openai/gpt-5.4/models.ts @@ -24,6 +24,17 @@ export const models = { tokenizer: "GPT", pinnedVersionOfModel: "gpt-5.4", }, + "gpt-5.4-mini": { + name: "OpenAI GPT-5.4 Mini", + author: "openai", + description: + "A smaller GPT-5.4 variant for lower-latency workloads with a reduced context window.", + contextLength: 1_050_000, + maxOutputTokens: 128_000, + created: "2026-03-05T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + }, } satisfies Record; export type GPT54ModelName = keyof typeof models; diff --git a/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts new file mode 100644 index 0000000000..55c5fe0528 --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.5/endpoints.ts @@ -0,0 +1,49 @@ +import { ModelProviderName } from "../../../providers"; +import type { ModelProviderConfig } from "../../../types"; +import { GPT55ModelName } from "./models"; + +export const endpoints = { + "gpt-5.5:starveri": { + providerModelId: "gpt-5.5", + provider: "starveri", + author: "openai", + pricing: [ + { + threshold: 0, + input: 0.0000008333333333334, // $0.83 per 1M tokens + output: 0.0000025, // $2.50 per 1M tokens + web_search: 0.0033333333333333335, + cacheMultipliers: { + cachedInput: 0.1, // $0.083 per 1M tokens + }, + }, + ], + contextLength: 1_050_000, + maxCompletionTokens: 128_000, + supportedParameters: [ + "tools", + "tool_choice", + "seed", + "max_completion_tokens", + "response_format", + "stop", + "verbosity", + "temperature", + "top_p", + "logprobs", + ], + unsupportedParameters: [ + "presence_penalty", + "frequency_penalty", + "top_logprobs", + "logit_bias", + "max_tokens", + ], + ptbEnabled: true, + endpointConfigs: { + "*": {}, + }, + }, +} satisfies Partial< + Record<`${GPT55ModelName}:${ModelProviderName}`, ModelProviderConfig> +>; diff --git a/packages/cost/models/authors/openai/gpt-5.5/models.ts b/packages/cost/models/authors/openai/gpt-5.5/models.ts new file mode 100644 index 0000000000..2ad20b4fd6 --- /dev/null +++ b/packages/cost/models/authors/openai/gpt-5.5/models.ts @@ -0,0 +1,16 @@ +import type { ModelConfig } from "../../../types"; + +export const models = { + "gpt-5.5": { + name: "OpenAI GPT-5.5", + author: "openai", + description: "GPT-5.5 frontier model for complex professional work.", + contextLength: 1_050_000, + maxOutputTokens: 128_000, + created: "2026-06-01T00:00:00.000Z", + modality: { inputs: ["text", "image"], outputs: ["text"] }, + tokenizer: "GPT", + }, +} satisfies Record; + +export type GPT55ModelName = keyof typeof models; diff --git a/packages/cost/models/authors/openai/index.ts b/packages/cost/models/authors/openai/index.ts index 5be9d36afe..dc3c23d940 100644 --- a/packages/cost/models/authors/openai/index.ts +++ b/packages/cost/models/authors/openai/index.ts @@ -15,6 +15,8 @@ import { models as gpt5Models } from "./gpt-5/models"; import { models as gpt51Models } from "./gpt-5.1/models"; import { models as gpt52Models } from "./gpt-5.2/models"; import { models as gpt54Models } from "./gpt-5.4/models"; +import { models as gpt55Models } from "./gpt-5.5/models"; +import { models as gpt53CodexModels } from "./gpt-5.3-codex/models"; import { models as ossModels } from "./oss/models"; import { models as gptImage1Models } from "./gpt-image-1/models"; @@ -28,6 +30,8 @@ import { endpoints as gpt5Endpoints } from "./gpt-5/endpoints"; import { endpoints as gpt51Endpoints } from "./gpt-5.1/endpoints"; import { endpoints as gpt52Endpoints } from "./gpt-5.2/endpoints"; import { endpoints as gpt54Endpoints } from "./gpt-5.4/endpoints"; +import { endpoints as gpt55Endpoints } from "./gpt-5.5/endpoints"; +import { endpoints as gpt53CodexEndpoints } from "./gpt-5.3-codex/endpoints"; import { endpoints as ossEndpoints } from "./oss/endpoints"; import { endpoints as gptImage1Endpoints } from "./gpt-image-1/endpoints"; @@ -42,6 +46,8 @@ export const openaiModels = { ...gpt51Models, ...gpt52Models, ...gpt54Models, + ...gpt55Models, + ...gpt53CodexModels, ...ossModels, ...gptImage1Models, } satisfies Record; @@ -57,6 +63,8 @@ export const openaiEndpointConfig = { ...gpt51Endpoints, ...gpt52Endpoints, ...gpt54Endpoints, + ...gpt55Endpoints, + ...gpt53CodexEndpoints, ...ossEndpoints, ...gptImage1Endpoints, } satisfies Record; diff --git a/packages/cost/models/provider-helpers.ts b/packages/cost/models/provider-helpers.ts index ae00f70ee3..4bf32ef79f 100644 --- a/packages/cost/models/provider-helpers.ts +++ b/packages/cost/models/provider-helpers.ts @@ -62,6 +62,8 @@ export function heliconeProviderToModelProviderName( return "fireworks"; case "CANOPYWAVE": return "canopywave"; + case "STARVERI": + return "starveri"; // new registry does not have case "LOCAL": case "HELICONE": @@ -156,6 +158,9 @@ export const dbProviderToProvider = ( if (provider === "chutes" || provider === "Chutes") { return "chutes"; } + if (provider === "starveri" || provider === "Starveri") { + return "starveri"; + } if (provider === "nebius" || provider === "Nebius") { return "nebius"; } diff --git a/packages/cost/models/providers/index.ts b/packages/cost/models/providers/index.ts index 963717d50d..9ef9e3d66d 100644 --- a/packages/cost/models/providers/index.ts +++ b/packages/cost/models/providers/index.ts @@ -16,6 +16,7 @@ import { NebiusProvider } from "./nebius"; import { NovitaProvider } from "./novita"; import { OpenAIProvider } from "./openai"; import { OpenRouterProvider } from "./openrouter"; +import { StarveriProvider } from "./starveri"; import { PerplexityProvider } from "./perplexity"; import { VertexProvider } from "./vertex"; import { XAIProvider } from "./xai"; @@ -40,6 +41,7 @@ export const providers = { novita: new NovitaProvider(), openai: new OpenAIProvider(), openrouter: new OpenRouterProvider(), + starveri: new StarveriProvider(), perplexity: new PerplexityProvider(), vertex: new VertexProvider(), xai: new XAIProvider() diff --git a/packages/cost/models/providers/priorities.ts b/packages/cost/models/providers/priorities.ts index 38df67014c..711d83d95d 100644 --- a/packages/cost/models/providers/priorities.ts +++ b/packages/cost/models/providers/priorities.ts @@ -34,6 +34,7 @@ export const PROVIDER_PRIORITIES: Record = { mistral: 4, nebius: 4, novita: 4, + starveri: 4, perplexity: 4, vertex: 4, diff --git a/packages/cost/models/providers/starveri.ts b/packages/cost/models/providers/starveri.ts new file mode 100644 index 0000000000..b716dd3a9e --- /dev/null +++ b/packages/cost/models/providers/starveri.ts @@ -0,0 +1,13 @@ +import { BaseProvider } from "./base"; + +export class StarveriProvider extends BaseProvider { + readonly displayName = "Starveri"; + readonly baseUrl = "https://api.starveri.net/"; + readonly auth = "api-key" as const; + readonly pricingPages = ["https://api.starveri.net/models"]; + readonly modelPages = ["https://api.starveri.net/models"]; + + buildUrl(): string { + return "https://api.starveri.net/v1/chat/completions"; + } +} diff --git a/packages/cost/providers/mappings.ts b/packages/cost/providers/mappings.ts index 7e856b54c5..e010b4da8d 100644 --- a/packages/cost/providers/mappings.ts +++ b/packages/cost/providers/mappings.ts @@ -94,6 +94,9 @@ const cerebras = /^https:\/\/api\.cerebras\.ai/; // https://inference.canopywave.io const canopywave = /^https:\/\/inference\.canopywave\.io/; +// https://api.starveri.net +const starveri = /^https:\/\/api\.starveri\.net/; + export const providersNames = [ "OPENAI", "ANTHROPIC", @@ -132,6 +135,7 @@ export const providersNames = [ "CEREBRAS", "BASETEN", "CANOPYWAVE", + "STARVERI", ] as const; export type ProviderName = (typeof providersNames)[number]; @@ -325,6 +329,11 @@ export const providers: { pattern: canopywave, provider: "CANOPYWAVE", costs: [], + }, + { + pattern: starveri, + provider: "STARVERI", + costs: [], } ]; diff --git a/packages/cost/usage/getUsageProcessor.ts b/packages/cost/usage/getUsageProcessor.ts index 3dc612abf9..71f5413ffc 100644 --- a/packages/cost/usage/getUsageProcessor.ts +++ b/packages/cost/usage/getUsageProcessor.ts @@ -24,6 +24,7 @@ export function getUsageProcessor( case "mistral": case "nebius": case "novita": + case "starveri": case "fireworks": case "cerebras": case "perplexity":