@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.cjs
CHANGED
|
@@ -2825,11 +2825,12 @@ var BedrockAdapter = class {
|
|
|
2825
2825
|
if (Object.keys(inferenceConfig).length > 0) {
|
|
2826
2826
|
commandInput.inferenceConfig = inferenceConfig;
|
|
2827
2827
|
}
|
|
2828
|
-
|
|
2828
|
+
const caching = req.cacheKey ? cachePointSupport(req.model) : void 0;
|
|
2829
|
+
if (caching) {
|
|
2829
2830
|
if (commandInput.system) {
|
|
2830
2831
|
commandInput.system.push({ cachePoint: { type: "default" } });
|
|
2831
2832
|
}
|
|
2832
|
-
if (tools) {
|
|
2833
|
+
if (tools && caching.tools) {
|
|
2833
2834
|
tools.tools.push({ cachePoint: { type: "default" } });
|
|
2834
2835
|
}
|
|
2835
2836
|
markLastMessageForCaching2(messages);
|
|
@@ -3053,6 +3054,11 @@ function buildWireMessages3(req) {
|
|
|
3053
3054
|
}
|
|
3054
3055
|
return out;
|
|
3055
3056
|
}
|
|
3057
|
+
function cachePointSupport(model) {
|
|
3058
|
+
if (model.includes("anthropic.claude")) return { tools: true };
|
|
3059
|
+
if (model.includes("amazon.nova")) return { tools: false };
|
|
3060
|
+
return void 0;
|
|
3061
|
+
}
|
|
3056
3062
|
function markLastMessageForCaching2(messages) {
|
|
3057
3063
|
if (messages.length === 0) return;
|
|
3058
3064
|
const last = messages[messages.length - 1];
|