mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 02:15:22 -04:00
feat: support cached token usage #54
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?
Originally created by @wellenzheng on GitHub (Aug 7, 2025).
support cached token usage
while glm-4.5 series models are supporting, we have the new usage strategy cached_token, we are hoping to add the cached_token support in the LLMUsage.
glm-4.5 usage sample
"usage": {
"completion_tokens": 139,
"prompt_tokens": 15427,
"prompt_tokens_details": {
"cached_tokens": 170
},
"total_tokens": 15566
}
@OPSTime commented on GitHub (Dec 23, 2025):
huaweicloud DeepSeek-V3 models are supporting, we are hoping to add the cached_token support in the LLMUsage.
DeepSeek-V3 usage sample
"usage": {
"completion_tokens": 46,
"prompt_tokens": 4282,
"total_tokens": 4328,
"completion_tokens_details": null,
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": 1024
}
}
@OPSTime commented on GitHub (Dec 25, 2025):
@Mairuis
Could you please implement this feature as soon as possible?
What is the approximate timeline?
Additionally, once this feature is implemented, will dify be able to support it immediately?