Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

DEFAULT_MAX_ASYNC was hardcoded to 8 in src/rag.py. Changed to read from environment variable MAX_ASYNC with fallback to 8.

Changes

  • src/rag.py: Read DEFAULT_MAX_ASYNC from MAX_ASYNC env var
# Before
DEFAULT_MAX_ASYNC = 8

# After
DEFAULT_MAX_ASYNC = int(os.getenv("MAX_ASYNC", "8"))

Note: This constant appears unused in current code (config.llm.max_async is used instead), but fix addresses the issue as stated.

Original prompt

This section details on the original issue you should resolve

<issue_title>DEFAULT_MAX_ASYNC hardcoded</issue_title>
<issue_description>## 问题描述
默认最大并发数硬编码。

受影响的文件

  • src/rag.py 行 31

硬编码值

  • DEFAULT_MAX_ASYNC = 8

解决方案

应该从环境变量读取。</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: BukeLy <19304666+BukeLy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix hardcoded DEFAULT_MAX_ASYNC value Fix DEFAULT_MAX_ASYNC hardcoding Dec 15, 2025
Copilot AI requested a review from BukeLy December 15, 2025 09:49
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.

DEFAULT_MAX_ASYNC hardcoded

2 participants