mirror of
https://github.com/langgenius/dify.git
synced 2026-05-11 23:18:39 +08:00
refactor(api): include model type in quota identity
Add model-type-aware quota helpers at the shared billing boundary while keeping the LLM-specific helpers as thin adapters. Preserve model_type in the deprecated ModelInstance wrappers and extend the quota unit tests to cover the generic helper delegation path.
This commit is contained in:
parent
5862b27044
commit
01aa6bf11e
@ -3,13 +3,17 @@
|
||||
from .quota import (
|
||||
deduct_llm_quota,
|
||||
deduct_llm_quota_for_model,
|
||||
deduct_model_quota,
|
||||
ensure_llm_quota_available,
|
||||
ensure_llm_quota_available_for_model,
|
||||
ensure_model_quota_available,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"deduct_llm_quota",
|
||||
"deduct_llm_quota_for_model",
|
||||
"deduct_model_quota",
|
||||
"ensure_llm_quota_available",
|
||||
"ensure_llm_quota_available_for_model",
|
||||
"ensure_model_quota_available",
|
||||
]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user