Skip to content
Source
Sign inSign up
TanStack/schemas

amazon-bedrock: state the upstream model from the card's model id #722

Mergedtombeckenhammerged 3 commits intomain fromfeat/718-upstream-amazon-bedrockmerged by tombeckenham View on GitHub

Showing 2 changed files with 86 additions and 0 deletions.

x
0 of 2 viewed, 2 left
48 additions and 0 deletionssrc/server/providers/adapters/amazon-bedrock.test.tsModified
View file
@@ -11,6 +11,7 @@
bedrockCardPrice,
bedrockReasoning,
parseBedrockCard,
+ parseBedrockProfileRows,
} from '../bedrock-cards.ts'
import {
BEDROCK_METERED_URL,
@@ -952,4 +953,51 @@
bedrockCardPrice(GPT54.replace('$2.00', '$unreadable'), 'global'),
).toThrow('amazon-bedrock model card pricing: unreadable quote')
+​
+ it('states the maker and model a card id names, minus Bedrock version and geography', () => {
+ const upstream = (rawId: string) => {
+ const identity = provider.upstreamModelIdentity?.(rawId)
+ return identity ? `${identity.providerNamespace}/${identity.rawId}` : null
+ }
+ // Ids from the live listing, 2026-11-21.
+ expect(upstream('anthropic.claude-opus-4-5-20251101-v1:0')).toBe(
+ 'anthropic/claude-opus-4-5-20251101',
+ )
+ expect(upstream('global.anthropic.claude-opus-4-6-v1')).toBe(
+ 'anthropic/claude-opus-4-6',
+ )