Skip to content

Commit 72e5969

Browse files
Update packages/typescript/ai-bedrock/package.json
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 19bb9b9 commit 72e5969

5 files changed

Lines changed: 15 additions & 27 deletions

File tree

packages/typescript/ai-bedrock/live-tests/tool-test-haiku.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function main() {
1111
const accessKeyId = process.env.AWS_ACCESS_KEY_ID ?? throwMissingEnv('AWS_ACCESS_KEY_ID')
1212
const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY ?? throwMissingEnv('AWS_SECRET_ACCESS_KEY')
1313

14-
const modelId = 'anthropic.claude-4-5-haiku-20251001-v1:0'
14+
const modelId = 'anthropic.claude-haiku-4-5-20251001-v1:0'
1515
console.log(`Running tool test for: ${modelId}`)
1616

1717
const stream = await chat({

packages/typescript/ai-bedrock/live-tests/tool-test-nova.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,22 @@ try {
1919
// .env.local not found
2020
}
2121

22+
function throwMissingEnv(name: string): never {
23+
throw new Error(`Missing required environment variable: ${name}`)
24+
}
25+
2226
async function testBedrockNovaToolCalling() {
2327
console.log('Testing Bedrock tool calling (Amazon Nova Pro)\n')
2428

29+
const accessKeyId = process.env.AWS_ACCESS_KEY_ID ?? throwMissingEnv('AWS_ACCESS_KEY_ID')
30+
const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY ?? throwMissingEnv('AWS_SECRET_ACCESS_KEY')
31+
2532
const stream = await chat({
2633
adapter: bedrockText('us.amazon.nova-pro-v1:0', {
27-
region: process.env.AWS_REGION || 'us-west-2',
34+
region: process.env.AWS_REGION || 'us-east-1',
2835
credentials: {
29-
accessKeyId: process.env.AWS_ACCESS_KEY_ID || '',
30-
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || '',
36+
accessKeyId,
37+
secretAccessKey,
3138
}
3239
}),
3340
messages: [

packages/typescript/ai-bedrock/src/model-meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const BEDROCK_AMAZON_NOVA_MICRO_V1 = {
5050

5151
export const BEDROCK_ANTHROPIC_CLAUDE_SONNET_4_5 = {
5252
name: 'claude-4-5-sonnet',
53-
id: 'anthropic.claude-4-5-sonnet-20250929-v1:0',
53+
id: 'anthropic.claude-sonnet-4-5-20250929-v1:0',
5454
context_window: 1_000_000,
5555
max_output_tokens: 64_000,
5656
supports: {
@@ -61,7 +61,7 @@ export const BEDROCK_ANTHROPIC_CLAUDE_SONNET_4_5 = {
6161

6262
export const BEDROCK_ANTHROPIC_CLAUDE_HAIKU_4_5 = {
6363
name: 'claude-4-5-haiku',
64-
id: 'anthropic.claude-4-5-haiku-20251001-v1:0',
64+
id: 'anthropic.claude-haiku-4-5-20251001-v1:0',
6565
context_window: 200_000,
6666
max_output_tokens: 64_000,
6767
supports: {

packages/typescript/ai-bedrock/src/text/text-provider-options.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
export interface BedrockMCPOptions {
2-
/**
3-
* MCP servers to be utilized in this request
4-
* Maximum of 20 servers
5-
*/
6-
mcp_servers?: Array<MCPServer>
7-
}
8-
91
export interface BedrockStopSequencesOptions {
102
/**
113
* Custom text sequences that will cause the model to stop generating.
@@ -44,18 +36,7 @@ export interface BedrockInferenceConfig {
4436
stopSequences?: Array<string>
4537
}
4638

47-
export interface MCPServer {
48-
name: string
49-
url: string
50-
type: 'url'
51-
authorization_token?: string | null
52-
tool_configuration: {
53-
allowed_tools?: Array<string> | null
54-
enabled?: boolean | null
55-
} | null
56-
}
57-
58-
export type BedrockTextProviderOptions = BedrockMCPOptions &
39+
export type BedrockTextProviderOptions =
5940
BedrockStopSequencesOptions &
6041
BedrockThinkingOptions &
6142
BedrockSamplingOptions & {

packages/typescript/ai-bedrock/tests/model-meta.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('Bedrock Model Input Modality Type Assertions', () => {
4545
})
4646

4747
describe('Claude 4.5 Sonnet (text + image + document)', () => {
48-
type Modalities = ResolveModalities<BedrockModelInputModalitiesByName['anthropic.claude-4-5-sonnet-20250929-v1:0']>
48+
type Modalities = ResolveModalities<BedrockModelInputModalitiesByName['anthropic.claude-sonnet-4-5-20250929-v1:0']>
4949
type Message = ConstrainedModelMessage<Modalities>
5050

5151
it('should allow TextPart, ImagePart, and DocumentPart', () => {

0 commit comments

Comments
 (0)