Skip to content

Commit 07ac41b

Browse files
authored
Merge pull request #1360 from Portkey-AI/fix/bedrock-messages-tools-cache-control-mapping
fix: tools cache_control parameter mapping for bedrock unified messages request transformer
2 parents f6bc63c + fc3a5cb commit 07ac41b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/providers/bedrock/utils/messagesUtils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ export const transformToolsConfig = (params: BedrockMessagesParams) => {
7575
inputSchema: { json: tool.input_schema },
7676
description: tool.description,
7777
},
78-
...(tool.cache_control && {
78+
});
79+
if (tool.cache_control) {
80+
tools.push({
7981
cachePoint: {
8082
type: 'default',
8183
},
82-
}),
83-
});
84+
});
85+
}
8486
}
8587
}
8688
}

0 commit comments

Comments
 (0)