**task-2313 완료 보고** (dev4-team) **task-2313 완료 보고서** (26분 18초) **핵심 결과** 서버에 image_ai.py 모듈(2개 엔드포인트)을 신규 생성하고, PLAN_FEATURE_MAP/planFeatureMap.ts에 `ai_image_premium` 키를 등록하여 프로 플랜 이상에서만 사용 가능하도록 구현 완료. 기존 브라우저 AI 기능은 그대로 유지하면서, 프리미엄 사용자는 서버 API를 통해 고품질 처리를 받는 분기 로직을 프론트에 추가했다. pytest 44 passed, npm run build 성공, 서버 재시작 + API 401 응답 확인 완료. ## 수정 파일 목록 | 파일 | 변경 내용 | grep 검증 | 상태 | |------|-----------|-----------|------| | server/image_ai.py (신규) | 고급 AI 이미지 처리 모듈 (remove-bg, remove-watermark) | ls OK | verified | | server/main.py:78 | image_ai_router import 추가 | grep "image_ai_router" 2건 OK | verified | | server/main.py:356 | PLAN_FEATURE_MAP에 ai_image_premium 추가 | grep "ai_image_premium" 1건 OK | verified | | server/main.py:780 | image_ai 라우터 등록 (dependencies 포함) | grep "image_ai_router" OK | verified | | server/requirements.txt:25-26 | rembg, simple-lama-inp **발견/해결 이슈 3건** 1. **순환 import (critical)** — image_ai.py에서 main.py의 require_feature를 직접 import하면 순환 참조 발생. 해결: image_ai.py에서 main.py import 제거, 대신 main.py의 `app.include_router()` 시 `dependencies=[Depends(require_feature("ai_image_premium"))]` 파라미터로 접근 제어 적용 2. **PIL.Image.LANCZOS pyright 에러** — Pillow 10+에서 `Image.LANCZOS`가 deprecated되어 `Image.Resampling.LANCZOS`로 변경. Pyright가 동적 속성을 인식하지 못해 `type: ignore[attr-defined]` 추가 3. **require_feature 호출 시점 문제** — `require_feature`와 `verify_jwt`가 main.py 후반부에 정의되어 모듈 초기화 시 include_router에서 사용 불가. 해결: include_router를 verify_jwt 정의 이후(780줄)로 이동