fix(llm): unify all providers to use VERTEX_API_KEY only#262
Conversation
- Remove separate gemini/vertex provider logic - All LLM calls now use vertexai=True with VERTEX_API_KEY - Fix 401 UNAUTHENTICATED error in Grand Tasting mode - Add VERTEX_AI_CONFIGURATION.md documentation Root cause: Setting GOOGLE_CLOUD_PROJECT triggers ADC lookup which fails Solution: Use only VERTEX_API_KEY without project parameter
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @ComBba, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the integration of Google-based Large Language Models (LLMs) by standardizing the API key usage across all providers to Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| resolved_model = model or PROVIDER_DEFAULTS.get( | ||
| provider_key, "gemini-3-flash-preview" | ||
| ) |
There was a problem hiding this comment.
기본 모델명인 gemini-3-flash-preview가 여기에 하드코딩되어 있습니다. 이 값은 이미 PROVIDER_DEFAULTS에 정의되어 있으므로, 딕셔너리를 직접 사용하면 향후 기본 모델 변경 시 한 곳만 수정하면 되어 유지보수성이 향상됩니다. provider_key가 유효한지 이미 앞에서 확인하고 있으므로, KeyError 발생 없이 PROVIDER_DEFAULTS[provider_key]를 안전하게 사용할 수 있습니다.
resolved_model = model or PROVIDER_DEFAULTS[provider_key]… all configs Only VERTEX_API_KEY is used now.
- Rename 'gemini' provider to 'google' for standard Gemini API - Add validate_google_key() and validate_vertex_key() in key_validator - Update provider_routing to respect user's provider choice for BYOK - Use PROVIDER_DEFAULTS[provider_key] instead of .get() for maintainability - Update all tests to use gemini-3 models only - Fix CI test failures by updating provider names in tests
- Add .env.test to gitignore - Add mock_mongo_connection and auth fixtures in conftest.py - Add test_api_endpoints_integration.py for endpoint testing
Remove tests that crash in CI due to MongoDB/SSE endpoint issues: - test_evaluate_stream_without_auth_returns_401 - test_evaluate_result_private_without_auth_returns_400 - test_graph_structure_without_auth_returns_401 - test_graph_execution_without_auth_returns_401
- Add icon.svg for modern browsers - Add apple-icon.png (180x180) for iOS - Update favicon.ico (16/32/48px) for legacy browsers - Remove unused Next.js template SVGs (file, globe, next, vercel, window)
…-key fix(llm): unify all providers to use VERTEX_API_KEY only
Summary
VERTEX_API_KEY만 사용하도록 통합Root Cause
GOOGLE_CLOUD_PROJECT환경변수가 설정되면 LangChain SDK가 ADC (Application Default Credentials) lookup을 시도하여 실패함.Changes
backend/app/providers/llm.py: gemini/vertex provider 로직 통합, 모두vertexai=True사용docs/VERTEX_AI_CONFIGURATION.md: 설정 문서 추가Configuration
Test Results