Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/agents/workflows/problem_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def split_problems(text: str, use_llm: bool = True) -> ProblemSplit:
print("---SPLITTER: Using LLM for problem splitting---")

try:
model = get_model(OpenRouterModelName.GPT_5_MINI)
model = get_model(OpenRouterModelName.GPT_5_MINI).with_config(tags=["skip_stream"])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the file structure and the specific line mentioned
wc -l src/agents/workflows/problem_splitter.py

Repository: Team-Proovy/Proovy-ai

Length of output: 109


🏁 Script executed:

# View the context around line 120
sed -n '110,130p' src/agents/workflows/problem_splitter.py

Repository: Team-Proovy/Proovy-ai

Length of output: 729


🏁 Script executed:

# Run the verification script to find all get_model calls and their skip_stream status
rg -n "get_model\b" --type py -A 3

Repository: Team-Proovy/Proovy-ai

Length of output: 5848


🏁 Script executed:

# View context around maingraph.py:244 to understand the function and determine if skip_stream is needed
sed -n '235,260p' src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 1093


🏁 Script executed:

# Also check the function name and purpose to confirm if this is an internal node
sed -n '220,250p' src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 1219


🏁 Script executed:

# Find the function definition that contains the get_model call at line 244
sed -n '200,245p' src/agents/workflows/maingraph.py | grep -n "def "

Repository: Team-Proovy/Proovy-ai

Length of output: 47


🏁 Script executed:

# Get a clearer view of the function definition
sed -n '200,220p' src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 736


🏁 Script executed:

# Find the function that contains line 244
sed -n '180,245p' src/agents/workflows/maingraph.py | head -40

Repository: Team-Proovy/Proovy-ai

Length of output: 1352


🏁 Script executed:

# Let's also look for all function definitions in maingraph.py to identify the function at line 244
rg -n "^def " src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 687


🏁 Script executed:

# Check the final_response function to understand the node type better
rg -n "def final_response" src/agents/workflows/maingraph.py -A 20

Repository: Team-Proovy/Proovy-ai

Length of output: 47


🏁 Script executed:

# Also check what nodes are marked as public-facing by examining the graph structure
rg -n "add_node\|add_edge" src/agents/workflows/maingraph.py | head -20

Repository: Team-Proovy/Proovy-ai

Length of output: 47


🏁 Script executed:

# Let's look at the entire maingraph.py file structure to find graph definition and node additions
rg -n "graph\." src/agents/workflows/maingraph.py | head -30

Repository: Team-Proovy/Proovy-ai

Length of output: 111


🏁 Script executed:

# Also check the imports to see where final_response is imported from
head -50 src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 1507


🏁 Script executed:

# Check if simple_response is added to the graph and what nodes are in the graph
rg -n "simple_response\|add_node.*simple" src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 47


🏁 Script executed:

# Look at the end of maingraph.py to see the graph structure and which nodes are public-facing
tail -100 src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 2662


🏁 Script executed:

# Confirm simple_response is an internal workflow node by checking complete function
sed -n '198,261p' src/agents/workflows/maingraph.py

Repository: Team-Proovy/Proovy-ai

Length of output: 2253


문제_분할기의 skip_stream 태그는 올바르게 추가되었으나, 메인그래프의 simple_response 함수에서 누락되었습니다.

이슈 #112에 따라 skip_stream이 누락된 모든 내부 노드를 업데이트해야 합니다. 현재 PR의 문제_분할기 변경은 정확하지만, 다음 위치에서 누락이 발견되었습니다:

  • src/agents/workflows/maingraph.py, 244줄: simple_response 함수의 get_model(OpenRouterModelName.GPT_5_MINI) 호출에 skip_stream 태그가 없습니다. 이 함수는 내부 라우팅 노드이므로 스트리밍을 비활성화해야 합니다.
model = get_model(OpenRouterModelName.GPT_5_MINI).with_config(tags=["skip_stream"])

로 수정하세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/agents/workflows/problem_splitter.py` at line 120, Update the model
instantiation inside the simple_response function to include the skip_stream
tag: locate the get_model(OpenRouterModelName.GPT_5_MINI) call in
simple_response (in maingraph.py) and chain .with_config(tags=["skip_stream"])
so the internal routing node disables streaming the same way as
problem_splitter's model variable.


messages = [
SystemMessage(content=SPLIT_SYSTEM_PROMPT),
Expand Down
3 changes: 2 additions & 1 deletion src/agents/workflows/review_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ def run_review(state: Dict[str, Any]) -> Dict[str, Any]:
print(
f"---REVIEW: MODEL={MODEL_NAME} openrouter_key_set={bool(settings.OPENROUTER_API_KEY)}---"
)
model = get_model(MODEL_NAME)
# Review 노드는 내부 JSON만 사용하므로 토큰 스트리밍을 비활성화한다.
model = get_model(MODEL_NAME).with_config(tags=["skip_stream"])
prompt = [
SystemMessage(content=REVIEW_SYSTEM_PROMPT),
HumanMessage(
Expand Down
7 changes: 6 additions & 1 deletion src/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ async def _handle_input(
)

input: Command | dict[str, Any]
input = {"messages": [HumanMessage(content=user_input.message)]}
input = {
"messages": [HumanMessage(content=user_input.message)],
# 이전 실행에서 체크포인터가 복원한 stale 값을 매 실행마다 초기화
"final_output": {},
"partial_responses": [],
}

if user_input.files_url:
files = list(user_input.files_url)
Expand Down