-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] SOLUTION 기능 지원 누락 수정 및 AI 라우터와 전처리 코드 수정 #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 1794
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 915
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 876
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 901
🏁 Script executed:
# Check Tool entity definition cat src/main/java/com/proovy/global/tool/entity/Tool.javaRepository: Team-Proovy/Proovy-server
Length of output: 1775
🏁 Script executed:
# Check the full ToolDataInitializer to see all tool initializations cat src/main/java/com/proovy/global/tool/config/ToolDataInitializer.javaRepository: Team-Proovy/Proovy-server
Length of output: 2117
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 457
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 51
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 1836
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 673
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 51
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 135
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 4339
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 51
🏁 Script executed:
# Look at the complete MessageTool entity to understand tool usage cat src/main/java/com/proovy/domain/conversation/entity/MessageTool.javaRepository: Team-Proovy/Proovy-server
Length of output: 832
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 4366
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 770
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 1241
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 1508
🏁 Script executed:
Repository: Team-Proovy/Proovy-server
Length of output: 209
대문자 기능명의 크레딧 차감 비용 매핑 누락
현재 코드는 "SOLUTION", "VARIATION", "GRAPH" 같은 대문자 기능명을
SUPPORTED_FEATURES에 추가했으나, 이들 기능이 실제로 크레딧 차감 시 비용 매핑에서 빠져 있습니다.문제 상황:
대문자 기능명 비용 매핑 누락
"SOLUTION"전송 → 검증 통과 ✓CreditUseService.useCredit()호출 (line 293)FEATURE_BASE_COST맵에는"Solution"만 있고"SOLUTION"은 없음getOrDefault()호출로 기본값 5 크레딧으로 처리 (line 161, silent fallback)"Solution": 20 크레딧)과 다른 금액 차감"Practice" 기능의 비용 매핑 누락
SUPPORTED_FEATURES에"Practice"가 있음 (line 72)FEATURE_BASE_COST에는 없음 (line 28-34)"Practice"기능 사용 시 기본값 5 크레딧으로 차감DB 도구 불일치
ToolDataInitializer는 3개 도구만 생성: GRAPH, SOLUTION, VARIATION수정 방법:
대문자 기능명이 Spring 검증 단계에서 도착하면, 크레딧 차감 전에 정규화된 형태로 변환하거나,
FEATURE_BASE_COST에 모든 기능명 변형(대문자 포함)을 추가하세요.private static final Map<String, Integer> FEATURE_BASE_COST = Map.of( "Solve", 10, "Explain", 5, "CreateGraph", 5, "Variant", 5, "Solution", 20, "Check", 3, + "SOLUTION", 20, + "VARIATION", 5, + "GRAPH", 5, + "Practice", 5 // 누락된 기능 );또는 검증 후 정규화:
feature.toLowerCase()또는 case-insensitive 비용 조회 로직 추가.🤖 Prompt for AI Agents