-
Notifications
You must be signed in to change notification settings - Fork 1
Fix Deploy Issues #63
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
Conversation
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.
Pull Request Overview
This PR addresses deployment issues by consolidating API endpoint configuration and fixing provider selection logic. The changes centralize hardcoded API URLs into a configuration system and resolve duplicate condition handling for the Gemini AI provider.
- Replaces hardcoded API URLs with centralized endpoint configuration
- Adds fallback logic for API base URL configuration using environment variables or window origin
- Fixes duplicate Gemini provider handling in backend endpoints
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/views/GraphRAGPanel.tsx | Replaces hardcoded API URLs with centralized endpoint constants |
| src/lib/config.ts | Adds GraphRAG endpoint definitions and improves API base URL configuration with fallback logic |
| backend/app/main.py | Adds duplicate condition handling for "gemini" provider selection |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| elif provider == "gemini": | ||
| # Support direct "gemini" provider selection from frontend | ||
| api_key = api_keys.get("geminiKey") or config_manager.get("ai_providers.google_genai.api_key", "") | ||
| graphrag_api_keys = {"geminiKey": api_key} |
Copilot
AI
Sep 11, 2025
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.
This condition is identical to the existing 'google_genai' condition above it (lines 754-756). Consider consolidating these conditions using 'elif provider in ["google_genai", "gemini"]:' to avoid code duplication.
| elif provider == "gemini": | ||
| # Support direct "gemini" provider selection from frontend | ||
| api_key = api_keys.get("geminiKey") or config_manager.get("ai_providers.google_genai.api_key", "") | ||
| graphrag_api_keys = {"geminiKey": api_key} |
Copilot
AI
Sep 11, 2025
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.
This condition is identical to the existing 'google_genai' condition above it (lines 885-887). Consider consolidating these conditions using 'elif provider in ["google_genai", "gemini"]:' to avoid code duplication.
| elif provider == "gemini": | ||
| # Support direct "gemini" provider selection from frontend | ||
| api_key = api_keys.get("geminiKey") or config_manager.get("ai_providers.google_genai.api_key", "") | ||
| graphrag_api_keys = {"geminiKey": api_key} |
Copilot
AI
Sep 11, 2025
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.
This condition is identical to the existing 'google_genai' condition above it (lines 1133-1135). Consider consolidating these conditions using 'elif provider in ["google_genai", "gemini"]:' to avoid code duplication.
No description provided.