@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/index.cjs
CHANGED
|
@@ -2838,11 +2838,12 @@ var BedrockAdapter = class {
|
|
|
2838
2838
|
if (Object.keys(inferenceConfig).length > 0) {
|
|
2839
2839
|
commandInput.inferenceConfig = inferenceConfig;
|
|
2840
2840
|
}
|
|
2841
|
-
|
|
2841
|
+
const caching = req.cacheKey ? cachePointSupport(req.model) : void 0;
|
|
2842
|
+
if (caching) {
|
|
2842
2843
|
if (commandInput.system) {
|
|
2843
2844
|
commandInput.system.push({ cachePoint: { type: "default" } });
|
|
2844
2845
|
}
|
|
2845
|
-
if (tools) {
|
|
2846
|
+
if (tools && caching.tools) {
|
|
2846
2847
|
tools.tools.push({ cachePoint: { type: "default" } });
|
|
2847
2848
|
}
|
|
2848
2849
|
markLastMessageForCaching2(messages);
|
|
@@ -3066,6 +3067,11 @@ function buildWireMessages3(req) {
|
|
|
3066
3067
|
}
|
|
3067
3068
|
return out;
|
|
3068
3069
|
}
|
|
3070
|
+
function cachePointSupport(model) {
|
|
3071
|
+
if (model.includes("anthropic.claude")) return { tools: true };
|
|
3072
|
+
if (model.includes("amazon.nova")) return { tools: false };
|
|
3073
|
+
return void 0;
|
|
3074
|
+
}
|
|
3069
3075
|
function markLastMessageForCaching2(messages) {
|
|
3070
3076
|
if (messages.length === 0) return;
|
|
3071
3077
|
const last = messages[messages.length - 1];
|