Skip to content

Commit

Permalink
feat: add anthropic overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
k11kirky committed Feb 1, 2025
1 parent df7222d commit e7f9df0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions plugin-server/src/utils/ai-costs/anthropic_overrides.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { ModelRow } from './types'

export const costs: ModelRow[] = [
{
model: 'claude-3-5-haiku',
cost: {
prompt_token: 8e-7,
completion_token: 0.000004,
},
},
{
model: 'claude-3-5-sonnet',
cost: {
prompt_token: 0.000003,
completion_token: 0.000015,
},
},
{
model: 'claude-3-opus',
cost: {
prompt_token: 0.000015,
completion_token: 0.000075,
},
},
{
model: 'claude-2',
cost: {
prompt_token: 0.000008,
completion_token: 0.000024,
},
},
]
2 changes: 2 additions & 0 deletions plugin-server/src/utils/ai-costs/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { costs as anthropicCosts } from './anthropic'
import { costs as anthropicOverrides } from './anthropic_overrides'
import { costs as cohereCosts } from './cohere'
import { costs as deepseekCosts } from './deepseek'
import { costs as googleCosts } from './google'
Expand All @@ -11,6 +12,7 @@ import type { ModelRow } from './types'
export const costs: ModelRow[] = [
...openaiCosts,
...anthropicCosts,
...anthropicOverrides,
...googleCosts,
...deepseekCosts,
...perplexityCosts,
Expand Down

0 comments on commit e7f9df0

Please sign in to comment.