@@ -277,6 +277,37 @@ describe("usage pricing", () => {
277277 }
278278 } ) ;
279279
280+ it ( "prices a bare name listed only under Bedrock IDs at the base anthropic rate" , ( ) => {
281+ const bedrock = ( input : number , output : number , cacheRead : number , cacheCreation : number ) => ( {
282+ input_cost_per_token : input ,
283+ output_cost_per_token : output ,
284+ cache_read_input_token_cost : cacheRead ,
285+ cache_creation_input_token_cost : cacheCreation ,
286+ } ) ;
287+ const base = bedrock ( 8e-6 , 4e-5 , 2e-7 , 1e-5 ) ;
288+ const regional = bedrock ( 8.8e-6 , 4.4e-5 , 2.2e-7 , 1.1e-5 ) ;
289+ const govCloud = bedrock ( 9.6e-6 , 4.8e-5 , 2.4e-7 , 1.2e-5 ) ;
290+ const rows = [
291+ [ "anthropic.claude-mythos-5-2" , base ] ,
292+ [ "global.anthropic.claude-mythos-5-2" , base ] ,
293+ [ "us.anthropic.claude-mythos-5-2" , regional ] ,
294+ [ "eu.anthropic.claude-mythos-5-2" , regional ] ,
295+ [ "us-gov.anthropic.claude-mythos-5-2" , govCloud ] ,
296+ [ "bedrock/us-gov-east-1/anthropic.claude-mythos-5-2" , govCloud ] ,
297+ [ "bedrock/us-gov-west-1/anthropic.claude-mythos-5-2" , govCloud ] ,
298+ ] as const ;
299+
300+ for ( const entries of [ rows , rows . toReversed ( ) ] ) {
301+ const table = parseRateTable ( Object . fromEntries ( entries ) ) ;
302+ expect ( lookupRate ( table , "claude-mythos-5-2" ) ) . toMatchObject ( {
303+ inputCostPerToken : 8e-6 ,
304+ outputCostPerToken : 4e-5 ,
305+ cacheReadCostPerToken : 2e-7 ,
306+ cacheCreationCostPerToken : 1e-5 ,
307+ } ) ;
308+ }
309+ } ) ;
310+
280311 it ( "leaves a bare name unpriced when model makers' own entries disagree" , ( ) => {
281312 const table = parseRateTable ( {
282313 "openai/example-model" : rate ( 1 ) ,
0 commit comments