Merged
Conversation
added 4 commits October 11, 2025 14:02
…age to handle workspace validation
…d terms in multiple languages
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces model total credits tracking functionality to the Dify platform. The changes add support for tracking trial credits usage across multiple LLM providers (OpenAI, Anthropic, Gemini, xAI, DeepSeek, and Tongyi) with a unified quota display panel.
Key Changes:
- Added credit tracking fields to workspace model (
trial_credits,trial_credits_used,next_credit_reset_date) - Redesigned quota panel to show consolidated credits with provider-specific status indicators
- Added support for 4 new LLM providers (Gemini, xAI/Grok, DeepSeek, Tongyi) with corresponding icons
- Updated i18n strings across English, Chinese, and Japanese locales
Reviewed changes
Copilot reviewed 33 out of 39 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web/models/common.ts | Added three new fields to ICurrentWorkspace for credit tracking |
| web/i18n/zh-Hans/common.json | Added new translation keys for model quota display and reset date |
| web/i18n/zh-Hans/billing.json | Updated tooltip text to include new supported providers |
| web/i18n/ja-JP/common.json | Added Japanese translations for new quota-related strings |
| web/i18n/ja-JP/billing.json | Updated Japanese tooltip for message credits |
| web/i18n/en-US/common.json | Added English translations for quota panel features |
| web/i18n/en-US/billing.json | Updated English tooltip to list all supported providers |
| web/context/app-context.tsx | Added isValidatingCurrentWorkspace flag and initialized new credit fields |
| web/app/components/plugins/provider-card.tsx | Simplified callback function syntax |
| web/app/components/header/account-setting/model-provider-page/utils.ts | Converted provider list to enum and added model name mappings |
| web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx | Complete redesign to show unified credit quota with provider icons |
| web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx | Removed per-provider quota display (moved to unified panel) |
| web/app/components/header/account-setting/model-provider-page/index.tsx | Added unified quota panel component and workspace refresh effect |
| web/app/components/billing/apps-full-in-dialog/index.spec.tsx | Updated test context to include new credit fields |
| web/app/components/base/icons/* | Added new icon components for Gemini, Grok, DeepSeek, Tongyi, OpenAI Small, and Anthropic Short |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...pp/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx Outdated Show resolved Hide resolved
...pp/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx Outdated Show resolved Hide resolved
...pp/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx Outdated Show resolved Hide resolved
… update existing icons for consistency
…nd improve type safety in quota panel component
…n model provider page and credential panel
iamjoel approved these changes Jan 4, 2026
CodingOnStar added a commit that referenced this pull request Jan 4, 2026
This reverts commit 84cbf05.
This was referenced Jan 13, 2026
Open
[CORRUPTED] Synthetic Benchmark PR #30518 - feat: revert model total credits qodo-benchmark/dify#187
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Important
Fixes #<issue number>.Summary
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods