fix(bedrock): use OrderedDict for _fetch_locks to support move_to_end… #2379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… method
Related Issues or Context
Fix
'dict' object has no attribute 'move_to_end'error when validating Bedrock inference profiles.When adding a Bedrock model with a cross-region inference profile ID (e.g.,
jp.anthropic.claude-haiku-4-5-20251001-v1:0), the validation fails with:Root Cause: In
models/bedrock/utils/inference_profile.py,_fetch_locksis declared as a regulardict(line 21), butmove_to_endmethod is called on it (line 30).move_to_endis only available onOrderedDict.Solution: Change
_fetch_locksfromdicttoOrderedDictto enable LRU cache behavior as intended.This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)0.0.57→0.0.58Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)dify_plugin==0.7.0(newer than template suggests)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment