From 919c08045272f909353f4599eba64d5f02be8014 Mon Sep 17 00:00:00 2001 From: hj24 Date: Wed, 1 Apr 2026 10:35:34 +0800 Subject: [PATCH] chore: update comments --- api/services/billing_service.py | 4 ++++ api/services/feature_service.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/api/services/billing_service.py b/api/services/billing_service.py index 13f9d1fcf4..0f0c49e7fe 100644 --- a/api/services/billing_service.py +++ b/api/services/billing_service.py @@ -37,7 +37,11 @@ class _VectorSpaceQuota(TypedDict): class _KnowledgeRateLimit(TypedDict): + # NOTE (hj24): + # 1. Return for sandbox users but is null for other plans, it's defined but never used. + # 2. Keep it for compatibility for now, can be deprecated in future versions. size: NotRequired[int] + # NOTE END limit: int diff --git a/api/services/feature_service.py b/api/services/feature_service.py index 56d896629c..df653e0ba7 100644 --- a/api/services/feature_service.py +++ b/api/services/feature_service.py @@ -336,7 +336,11 @@ class FeatureService: features.model_load_balancing_enabled = billing_info["model_load_balancing_enabled"] if "knowledge_rate_limit" in billing_info: + # NOTE (hj24): + # 1. knowledge_rate_limit size is nullable, currently it's defined but never used, only limit is used. + # 2. So be careful if later we decide to use [size], we cannot assume it is always present. features.knowledge_rate_limit = billing_info["knowledge_rate_limit"]["limit"] + # NOTE END if "knowledge_pipeline_publish_enabled" in billing_info: features.knowledge_pipeline.publish_enabled = billing_info["knowledge_pipeline_publish_enabled"]