Conversation
…and observer cleanup
…-deps, and update docs
…check to satisfy Ruff TRY300
…ifespan, and move asyncio import to stdlib group
…ion logging feedback
…nd update UI/README
….py fallbacks, and unused vars
…null-safe, logging)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughGoogle Gemini API에서 OpenAI API로의 백엔드 마이그레이션을 수행합니다. 구성 설정, 환경 변수, 서비스 로직, 의존성 및 스크립트에서 관련 참조를 업데이트하여 Gemini 클라이언트를 OpenAI 클라이언트로 교체합니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@backend/app/api/routes/chat.py`:
- Around line 87-91: The current use of
asyncio.wait_for(asyncio.to_thread(_search_documents, query_vector),
timeout=CHAT_TIMEOUT) can leave the worker thread running after a timeout;
instead, remove the wait_for wrapper and call await
asyncio.to_thread(_search_documents, query_vector) directly while keeping the
semaphore (_db_rpc_semaphore) to limit concurrency, and rely on the DB client’s
internal timeout to abort long DB ops; update error handling around the await to
handle and log DB client timeouts/errors (referencing _search_documents,
_db_rpc_semaphore and CHAT_TIMEOUT) and remove any logic that assumes wait_for
will cancel the background thread.
In `@backend/requirements.txt`:
- Line 6: The langchain-openai version constraint currently prevents installing
the latest 1.x releases; update the requirement for the package named
"langchain-openai" by removing the upper bound or changing the spec to allow 1.x
(e.g., replace "langchain-openai>=0.1.0,<1.0.0" with "langchain-openai>=0.1.0"
or a range that includes 1.x) so the latest 1.1.10 (2026-02-17) can be
installed.
In `@backend/scripts/check_models.py`:
- Line 4: The code imports OpenAI directly with "from openai import OpenAI" but
the openai package is not listed explicitly in requirements.txt; add an explicit
dependency entry for "openai" (pinned to a compatible version with your
langchain-openai dependency) to requirements.txt so direct imports are
satisfied, then run your dependency/install workflow (pip install / lockfile
update) to ensure CI and local installs include the package.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8bec5acd-744c-4c2a-a02e-5abb5dcadebc
📒 Files selected for processing (9)
backend/app/api/routes/chat.pybackend/app/core/config.pybackend/app/core/env_utils.pybackend/app/services/database.pybackend/app/services/llm.pybackend/requirements.txtbackend/scripts/check_models.pybackend/scripts/generate_book_mapping.pybackend/tests/unit/test_llm.py
There was a problem hiding this comment.
🧹 Nitpick comments (2)
backend/app/api/routes/chat.py (2)
92-93:logging.exception호출에서 중복된 예외 객체를 제거하세요.
logger.exception은 자동으로 예외 정보와 트레이스백을 포함하므로{e}를 메시지에 포함할 필요가 없습니다.♻️ 제안된 수정
except Exception as e: - logger.exception(f"Database search failed: {e}") + logger.exception("Database search failed")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@backend/app/api/routes/chat.py` around lines 92 - 93, In the except block that currently reads "except Exception as e: logger.exception(f\"Database search failed: {e}\")" (in backend/app/api/routes/chat.py), remove the redundant "{e}" from the log message and call logger.exception with a plain message like "Database search failed" so the exception and traceback are captured only once by logger.exception; do not pass exc_info or the exception object separately.
207-209: 타임아웃 로그 형식의 일관성을 고려하세요.다른 타임아웃 로그는 실제 경과 시간(
time.perf_counter() - t0)을 기록하지만, 여기서는 상수 값만 출력합니다. 일관성을 위해 동일한 패턴을 적용하는 것이 좋습니다.♻️ 제안된 수정
+ t_start = time.perf_counter() try: title = await asyncio.wait_for(generate_chat_title_async(query), timeout=CHAT_TIMEOUT) # ... except asyncio.TimeoutError: - logger.warning(f"Timeout generating chat title after {CHAT_TIMEOUT}s") + logger.warning(f"Timeout generating chat title after {time.perf_counter() - t_start:.2f}s") return {"title": DEFAULT_CHAT_TITLE}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@backend/app/api/routes/chat.py` around lines 207 - 209, The timeout handler currently logs the constant CHAT_TIMEOUT; change the logger.warning in the except asyncio.TimeoutError block to report the actual elapsed time (e.g., use time.perf_counter() - t0) for consistency with other timeout logs; update the reference in that block (where DEFAULT_CHAT_TITLE is returned) to compute elapsed from the existing t0 variable and include that elapsed value in the warning message instead of CHAT_TIMEOUT.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@backend/app/api/routes/chat.py`:
- Around line 92-93: In the except block that currently reads "except Exception
as e: logger.exception(f\"Database search failed: {e}\")" (in
backend/app/api/routes/chat.py), remove the redundant "{e}" from the log message
and call logger.exception with a plain message like "Database search failed" so
the exception and traceback are captured only once by logger.exception; do not
pass exc_info or the exception object separately.
- Around line 207-209: The timeout handler currently logs the constant
CHAT_TIMEOUT; change the logger.warning in the except asyncio.TimeoutError block
to report the actual elapsed time (e.g., use time.perf_counter() - t0) for
consistency with other timeout logs; update the reference in that block (where
DEFAULT_CHAT_TITLE is returned) to compute elapsed from the existing t0 variable
and include that elapsed value in the warning message instead of CHAT_TIMEOUT.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 00a268b6-1540-4691-92e9-6d15e65d632d
📒 Files selected for processing (2)
backend/app/api/routes/chat.pybackend/requirements.txt
Summary by CodeRabbit
릴리스 노트
개선 사항
기술 업데이트