@jambonz/llm 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/test-kit/index.cjs +8 -2
- package/dist/test-kit/index.cjs.map +1 -1
- package/dist/test-kit/index.js +8 -2
- package/dist/test-kit/index.js.map +1 -1
- package/package.json +1 -1
package/dist/test-kit/index.js
CHANGED
|
@@ -2792,11 +2792,12 @@ var BedrockAdapter = class {
|
|
|
2792
2792
|
if (Object.keys(inferenceConfig).length > 0) {
|
|
2793
2793
|
commandInput.inferenceConfig = inferenceConfig;
|
|
2794
2794
|
}
|
|
2795
|
-
|
|
2795
|
+
const caching = req.cacheKey ? cachePointSupport(req.model) : void 0;
|
|
2796
|
+
if (caching) {
|
|
2796
2797
|
if (commandInput.system) {
|
|
2797
2798
|
commandInput.system.push({ cachePoint: { type: "default" } });
|
|
2798
2799
|
}
|
|
2799
|
-
if (tools) {
|
|
2800
|
+
if (tools && caching.tools) {
|
|
2800
2801
|
tools.tools.push({ cachePoint: { type: "default" } });
|
|
2801
2802
|
}
|
|
2802
2803
|
markLastMessageForCaching2(messages);
|
|
@@ -3020,6 +3021,11 @@ function buildWireMessages3(req) {
|
|
|
3020
3021
|
}
|
|
3021
3022
|
return out;
|
|
3022
3023
|
}
|
|
3024
|
+
function cachePointSupport(model) {
|
|
3025
|
+
if (model.includes("anthropic.claude")) return { tools: true };
|
|
3026
|
+
if (model.includes("amazon.nova")) return { tools: false };
|
|
3027
|
+
return void 0;
|
|
3028
|
+
}
|
|
3023
3029
|
function markLastMessageForCaching2(messages) {
|
|
3024
3030
|
if (messages.length === 0) return;
|
|
3025
3031
|
const last = messages[messages.length - 1];
|