Skip to content

Commit c300bf4

Browse files
authored
fix(ccusage): support Opus 4.5 pricing from Bedrock-prefixed models (#743)
* fix(ccusage): support Opus 4.5 pricing from Bedrock-prefixed models LiteLLM lists Opus 4.5 models with anthropic.claude- prefix (e.g., anthropic.claude-opus-4-5-20251101-v1:0) but the isClaudeModel filter only kept models starting with claude-. This adds support for anthropic.claude- and anthropic/claude- prefixes to include Bedrock-format models in the pricing dataset. * chore: remove unnecessary tests
1 parent fed61e5 commit c300bf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/ccusage/src/_macro.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
} from '@ccusage/internal/pricing-fetch-utils';
88

99
function isClaudeModel(modelName: string, _pricing: LiteLLMModelPricing): boolean {
10-
return modelName.startsWith('claude-');
10+
return modelName.startsWith('claude-')
11+
|| modelName.startsWith('anthropic.claude-')
12+
|| modelName.startsWith('anthropic/claude-');
1113
}
1214

1315
export async function prefetchClaudePricing(): Promise<Record<string, LiteLLMModelPricing>> {

0 commit comments

Comments
 (0)