@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.js CHANGED
@@ -2799,11 +2799,12 @@ var BedrockAdapter = class {
2799
2799
  if (Object.keys(inferenceConfig).length > 0) {
2800
2800
  commandInput.inferenceConfig = inferenceConfig;
2801
2801
  }
2802
- if (req.cacheKey) {
2802
+ const caching = req.cacheKey ? cachePointSupport(req.model) : void 0;
2803
+ if (caching) {
2803
2804
  if (commandInput.system) {
2804
2805
  commandInput.system.push({ cachePoint: { type: "default" } });
2805
2806
  }
2806
- if (tools) {
2807
+ if (tools && caching.tools) {
2807
2808
  tools.tools.push({ cachePoint: { type: "default" } });
2808
2809
  }
2809
2810
  markLastMessageForCaching2(messages);
@@ -3027,6 +3028,11 @@ function buildWireMessages3(req) {
3027
3028
  }
3028
3029
  return out;
3029
3030
  }
3031
+ function cachePointSupport(model) {
3032
+ if (model.includes("anthropic.claude")) return { tools: true };
3033
+ if (model.includes("amazon.nova")) return { tools: false };
3034
+ return void 0;
3035
+ }
3030
3036
  function markLastMessageForCaching2(messages) {
3031
3037
  if (messages.length === 0) return;
3032
3038
  const last = messages[messages.length - 1];