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
9 changes: 6 additions & 3 deletions src/api/providers/fetchers/__tests__/litellm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,11 @@ describe("getLiteLLMModels", () => {
maxTokens: 64000,
contextWindow: 200000,
supportsImages: true,
supportsComputerUse: true,
supportsPromptCache: false,
inputPrice: undefined,
outputPrice: undefined,
cacheWritesPrice: undefined,
cacheReadsPrice: undefined,
description: "claude-3-5-sonnet-4-5 via LiteLLM proxy",
})

Expand All @@ -657,10 +658,11 @@ describe("getLiteLLMModels", () => {
maxTokens: 8192,
contextWindow: 128000,
supportsImages: false,
supportsComputerUse: false,
supportsPromptCache: false,
inputPrice: undefined,
outputPrice: undefined,
cacheWritesPrice: undefined,
cacheReadsPrice: undefined,
description: "model-with-only-max-tokens via LiteLLM proxy",
})

Expand All @@ -669,10 +671,11 @@ describe("getLiteLLMModels", () => {
maxTokens: 16384,
contextWindow: 100000,
supportsImages: false,
supportsComputerUse: false,
supportsPromptCache: false,
inputPrice: undefined,
outputPrice: undefined,
cacheWritesPrice: undefined,
cacheReadsPrice: undefined,
description: "model-with-only-max-output-tokens via LiteLLM proxy",
})
})
Expand Down
1 change: 0 additions & 1 deletion src/api/providers/fetchers/litellm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise
maxTokens: modelInfo.max_output_tokens || modelInfo.max_tokens || 8192,
contextWindow: modelInfo.max_input_tokens || 200000,
supportsImages: Boolean(modelInfo.supports_vision),
// litellm_params.model may have a prefix like openrouter/
supportsPromptCache: Boolean(modelInfo.supports_prompt_caching),
inputPrice: modelInfo.input_cost_per_token ? modelInfo.input_cost_per_token * 1000000 : undefined,
outputPrice: modelInfo.output_cost_per_token
Expand Down