Skip to content

[feat] AI 팀장 대화 일일 잔여 횟수 조회 API (GET /users/me/ai-quota) - #321

Merged
HyunWoo9930 merged 1 commit into
developfrom
codex/ai-quota-endpoint
Jun 26, 2026
Merged

[feat] AI 팀장 대화 일일 잔여 횟수 조회 API (GET /users/me/ai-quota)#321
HyunWoo9930 merged 1 commit into
developfrom
codex/ai-quota-endpoint

Conversation

@HyunWoo9930

Copy link
Copy Markdown
Contributor

목적

FE 가 AI 팀장 채팅 일일 한도 소진 전에 잔여 횟수를 표시하기 위한 read-only 조회 API.

변경

  • RateLimiter.peek(key): 카운터 증가 없이 현재 사용량/리셋 잔여시간 조회(default=정보없음, RedisRateLimiter 가 GET+PTTL 로 구현). 인터페이스는 default 로 함수형 유지.
  • RateLimitSnapshot, AiConversationQuotaView 추가. RateLimitGuard.aiConversationQuota(userId, plan) 신설.
  • GET /api/v1/users/me/ai-quota{plan, dailyLimit, used, remaining, resetSeconds}. 레이트리밋 미구성 시 -1(무제한).

검증

로컬 ./gradlew check build 전체 통과. 신규 테스트: 증가 없이 사용량 보고.

🤖 Generated with Claude Code

FE 가 일일 한도 소진 전에 잔여 횟수를 표시할 수 있도록, 증가 없이(read-only)
현재 사용량/잔여/리셋 잔여시간을 조회하는 엔드포인트를 추가한다.

- RateLimiter.peek(key): 카운터 증가 없이 스냅샷 조회(default=정보없음, Redis 가 GET+PTTL 로 구현).
- RateLimitSnapshot(count, timeToReset), AiConversationQuotaView(dailyLimit, used, remaining, resetSeconds) 추가.
- RateLimitGuard.aiConversationQuota(userId, plan): 플랜별 일일 한도 + 현재 사용량 스냅샷.
- AuthController: GET /api/v1/users/me/ai-quota → {plan, dailyLimit, used, remaining, resetSeconds}.
  레이트리밋 미구성 시 dailyLimit/remaining=-1(무제한).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HyunWoo9930
HyunWoo9930 merged commit 0582705 into develop Jun 26, 2026
7 of 8 checks passed
@HyunWoo9930
HyunWoo9930 deleted the codex/ai-quota-endpoint branch June 26, 2026 08:31
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