* 'release/v0.3.1' of github.com:SuanmoSuanyangTechnology/MemoryBear:
fix(web): stream add default error message
fix(quota): restrict quota check to new terminal user creation only
fix(api): fix API Key rate limiting and terminal user quota checks
feat(exception): enhance I18nException response format and add error code mapping
feat(quota): add quota checks during app duplication and import operations
fix(知识服务): 添加工作空间模型配置的校验
refactor(knowledge_service): 简化模型绑定逻辑,直接使用工作区配置
fix(知识服务): 修复创建知识库时未检查视觉模型存在的错误
refactor(knowledge_service): 优化模型绑定逻辑,使用ID查询并简化回退机制
- Revert API Key rate limit handling to throw an error instead of auto-capping when exceeding the plan limit.
- Optimize terminal user quota check logic to validate only during new user creation, avoiding redundant checks.
- Add method to query terminal users by `workspace_id` and `other_id`.
- Standardize error response format to include business error codes, timestamps, and other fields.
- Add ERROR_CODE_TO_BIZ_CODE mapping table for error code conversion.
- Introduce QUOTA_EXCEEDED and RATE_LIMIT_EXCEEDED business error codes.
- Add model reference resolution for LLM, Question Classifier, and Parameter Extractor nodes.
- Support parsing various model reference formats, including dictionaries, UUID strings, and name strings, when `model_id` is present.
- Add warning logs for cases where model resolution fails.
- Extract duplicate model binding logic into `_get_model_by_name_or_fallback`.
- Implement logic to prioritize workspace default configuration, falling back to the tenant's first available model if not found.
- Simplify binding code for embedding, rerank, and LLM models.
- Add logic to detect tenant plan QPS limits and return a specific error message when triggered.
- Simplify boolean check in model activation quota validation.
Corrected variable reference in get_end_user_connected_config log statement. The previous code referenced app.workspace_id which could be incorrect or undefined in this context.
- Add logic to detect tenant plan QPS limits and return a specific error message when triggered.
- Simplify boolean check in model activation quota validation.
- Fix issue where tenant ID lookup from shared records failed to query the workspace correctly.
- Switch QPS counting from sliding window to simple counter to improve performance and simplify logic.
- Remove unnecessary `time` module import.