Skip to content

Commit 865da85

Browse files
committed
fix gemini fail error
1 parent 7ebdf00 commit 865da85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backend/app/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,10 @@ def graphrag_endpoint():
11331133
api_key = api_keys.get("geminiKey") or config_manager.get("ai_providers.google_genai.api_key", "")
11341134
graphrag_api_keys = {"geminiKey": api_key}
11351135
provider = "gemini" # Map to GraphRAG service provider name
1136+
elif provider == "gemini":
1137+
# Support direct "gemini" provider selection from frontend
1138+
api_key = api_keys.get("geminiKey") or config_manager.get("ai_providers.google_genai.api_key", "")
1139+
graphrag_api_keys = {"geminiKey": api_key}
11361140
elif provider == "anthropic":
11371141
api_key = api_keys.get("anthropicKey") or config_manager.get("ai_providers.anthropic.api_key", "")
11381142
graphrag_api_keys = {"anthropicKey": api_key}

0 commit comments

Comments
 (0)