mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #1863] [MERGED] Fix the throttling on the 'get inference profile' endpoint when the Agent is called too frequently. #2124
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/1863
Author: @noproblem520
Created: 10/15/2025
Status: ✅ Merged
Merged: 10/16/2025
Merged by: @crazywoola
Base:
main← Head:fix/get_inference_profile_throttling📝 Commits (2)
d53f766fix get inference profile throttlingcae5dfbupdated manifest and fixed comments📊 Changes
2 files changed (+44 additions, -9 deletions)
View changed files
📝
models/bedrock/manifest.yaml(+1 -1)📝
models/bedrock/utils/inference_profile.py(+43 -8)📄 Description
Related Issues or Context
During stress testing of our self-hosted Dify deployment, we observed numerous operational failures. The root cause is that every model invocation is preceded by a call to
bedrock_client.get_inference_profile(), an API with its own rate limitations. We have verified with AWS Support that implementing a caching mechanism for this API call on the plugin side is the appropriate path to resolution.error message:

Failed to transform agent message: req_id: dd007855e6 PluginInvokeError: {"args":{},"error_type":"Exception","message":"read llm model failed: request failed: [bedrock] Error: req_id: 0dbe05893e PluginInvokeError: {\"args\":{\"description\":\"[models] Error: Failed to invoke inference profile global.anthropic.claude-sonnet-4-20250514-v1:0: An error occurred (ThrottlingException) when calling the GetInferenceProfile operation (reached max retries: 4): Too many requests, please wait before trying again. You have sent too many requests. Wait before trying again.\"},\"error_type\":\"InvokeError\",\"message\":\"[models] Error: Failed to invoke inference profile global.anthropic.claude-sonnet-4-20250514-v1:0: An error occurred (ThrottlingException) when calling the GetInferenceProfile operation (reached max retries: 4): Too many requests, please wait before trying again. You have sent too many requests. Wait before trying again.\"}"}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)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
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.