-
-
Notifications
You must be signed in to change notification settings - Fork 323
Closed
Labels
bugSomething isn't working correctlySomething isn't working correctly
Description
Bug Description
We can't run the project on Vertex AI with the example environment configuration. I may be doing something wrong, but then it would require some clarification in the documentation
Steps to Reproduce
If you try to run cgr using this config
# Example 4: Google Vertex AI
# ORCHESTRATOR_PROVIDER=google
# ORCHESTRATOR_MODEL=gemini-2.5-pro
# ORCHESTRATOR_PROJECT_ID=your-gcp-project-id
# ORCHESTRATOR_REGION=us-central1
# ORCHESTRATOR_PROVIDER_TYPE=vertex
# ORCHESTRATOR_SERVICE_ACCOUNT_FILE=/path/to/service-account.json
# CYPHER_PROVIDER=google
# CYPHER_MODEL=gemini-2.5-flash
# CYPHER_PROJECT_ID=your-gcp-project-id
# CYPHER_REGION=us-central1
# CYPHER_PROVIDER_TYPE=vertex
# CYPHER_SERVICE_ACCOUNT_FILE=/path/to/service-account.json
Cgr will tell me I am missing GOOGLE_API_KEY env and even give me link where to get this API key
cgr start --repo-path /home/ubuntu/workspace/some-repo-i-am-testing
─── API Key Missing ───────────────────────────────────────────────
Error: GOOGLE_API_KEY environment variable is not set.
This is required to use Google AI for cypher.
To fix this:
1. Get your API key from:
https://console.cloud.google.com/apis/credentials
2. Set it in your environment:
export GOOGLE_API_KEY='your-key-here'
Or add it to your .env file in the project root:
GOOGLE_API_KEY=your-key-here
3. Alternatively, you can use a local model with Ollama:
(No API key required)
however if I set up GOOGLE_API_KEY I will get error saying extra input is not allowed in envs.
Traceback (most recent call last):
File "/home/ubuntu//code-graph-rag/.venv/bin/cgr", line 4, in <module>
from codebase_rag.cli import app
File "/home/ubuntu/code-graph-rag/codebase_rag/cli.py", line 12, in <module>
from .config import load_cgrignore_patterns, settings
File "/home/ubuntu/code-graph-rag/codebase_rag/config.py", line 325, in <module>
settings = AppConfig()
^^^^^^^^^^^
File "/home/ubuntu/code-graph-rag/.venv/lib/python3.12/site-packages/pydantic_settings/main.py", line 194, in __init__
super().__init__(
File "/home/ubuntu/code-graph-rag/.venv/lib/python3.12/site-packages/pydantic/main.py", line 250, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for AppConfig
google_api_key
Extra inputs are not permitted [type=extra_forbidden, input_value='I am not giving you my key :P', input_type=str]
For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden
Expected Behavior
Should run project using credentials from the service account
Actual Behavior
Requests me some GOOGLE_API_KEY while also not running after providing one.
Error Logs
Programming Language
No response
Version
0.0.65
Operating System
Linux
Python Version
3.12.12
LLM Provider
Google Gemini
Additional Context
No response
Checklist
- I have searched existing issues to ensure this is not a duplicate
- I have included all relevant error logs and steps to reproduce
- I am using a supported version of Python (3.12+)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctly
Projects
Status
Done