mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #1619] [MERGED] Fix/bedrock inference profile cache support #1991
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/1619
Author: @akshaysinghas
Created: 8/30/2025
Status: ✅ Merged
Merged: 9/1/2025
Merged by: @crazywoola
Base:
main← Head:fix/bedrock-inference-profile-cache-support📝 Commits (10+)
e354aa1fix(bedrock): improve cache support detection for inference profileseaf982efix(bedrock): change cache checkpoint defaults to respect UI settings359a399fix(bedrock): clean up and apply only essential cache support fixes0dca1cfAddress PR review feedback: Replace print statements with logger calls and sanitize logginga5223e0Add back cache debug logs with appropriate logger.debug() levela8fe744Remove [CACHE DEBUG] markers and use logger.debug()ae1dcacRemove dead code comment and improve cache checkpoint default explanationc7d8768Consolidate duplicate stream warning messages1fa707fRemove obsolete debug commentefeb140Remove unnecessary cache params debug logging📊 Changes
3 files changed (+26 additions, -36 deletions)
View changed files
📝
models/bedrock/manifest.yaml(+1 -1)📝
models/bedrock/models/llm/cache_config.py(+0 -2)📝
models/bedrock/models/llm/llm.py(+25 -33)📄 Description
Related Issues or Context
Context: Fixed cache support detection for AWS Bedrock inference profiles. Previously, cache support was incorrectly evaluated as false for inference profiles even when the underlying model supported caching (e.g., Nova Pro, Claude 3.7 Sonnet).
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Changes to Prompt Caching for Inference Profiles:
Testing Results:
Bug Fix: Corrected cache parameter defaults to respect UI settings
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Version bumped from 0.0.33 to 0.0.34 (PATCH - bug fix)
Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.5.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
Tested with both Nova Pro and Claude 3.5 Sonnet inference profiles on local Dify deployment.
SaaS Environment
These images reflect logs when enabled the cache from UI and disabled from UI for system prompt. Observe the diff in Cache checkpoints - System: True/False


0-4c5e22c17025" />
When true is reads from cache
When false nothing read from cache

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.