Skip to content

feat: Nexent规格表-enforce conversation turn and history limits - #3717

Open
Junqilee wants to merge 1 commit into
ModelEngine-Group:developfrom
Junqilee:codex/conversation-resource-limits
Open

feat: Nexent规格表-enforce conversation turn and history limits#3717
Junqilee wants to merge 1 commit into
ModelEngine-Group:developfrom
Junqilee:codex/conversation-resource-limits

Conversation

@Junqilee

Copy link
Copy Markdown
Contributor

Summary

  • Limit each conversation to 100 user turns.
  • Limit each user's active conversation history to 1,000 conversations.
  • Enforce limits in both conversation creation and Agent execution paths.
  • Return standard error code 120104 with HTTP 429.
  • Add structured error details and Chinese/English frontend messages for both /chat and /newchat.

Validation

  • Backend database, service, conversation API, and Agent API tests passed.
  • Frontend build passed.
  • Manually verified Chinese and English limit messages in the isolated environment.
  • Formal limits restored to 100/1,000 before commit.

前端测试时,临时设置limit均为1(仅支持1个历史会话,每个会话仅支持1轮)。效果见以下截图:

8 20-单对话轮数限制(测试时设置为1)-英文 8 20-单对话轮数限制(测试时设置为1)-中文 8 20-历史会话数量上限-英文 8 20-历史会话数量上限-中文

@Junqilee
Junqilee force-pushed the codex/conversation-resource-limits branch from 9d7ffe3 to 3aed468 Compare August 20, 2026 10:10
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/database/conversation_db.py 90.00% 3 Missing ⚠️
...ackend/services/conversation_management_service.py 90.90% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Junqilee Junqilee changed the title feat: enforce conversation turn and history limits feat: Nexent规格表-enforce conversation turn and history limits Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant