8000 Subject: Issue with Vertex AI JSON Credential Configuration - "Incomplete JSON segment at the end" · Issue #3953 · RooCodeInc/Roo-Code · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Subject: Issue with Vertex AI JSON Credential Configuration - "Incomplete JSON segment at the end" #3953

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

Open
alexcz-a11y opened this issue May 25, 2025 · 1 comment
Labels
bug Something isn't working Issue - Unassigned / Actionable Clear and approved. Available for contributors to pick up.

Comments

@alexcz-a11y
Copy link

App Version

v3.18.3

API Provider

Google Vertex AI

Model Used

gemini 2.5 flash

🔁 Steps to Reproduce

  • Setup:

    1. RooCode instance.
    2. Google Cloud Platform (GCP) project configured with Vertex AI API enabled.
    3. A Service Account created in the GCP project with necessary permissions for Vertex AI (e.g., "Vertex AI User" role).
    4. The Service Account JSON key file downloaded from GCP.
    5. The content of this JSON key file has been validated using an external JSON validator and confirmed to be complete and syntactically correct.
  • Exact Actions (within RooCode):

    1. Navigate to the section in RooCode for configuring external services or AI integrations, specifically for Google Cloud Vertex AI.
    2. In the field designated for "Google Cloud Credentials" (often labeled "Google Cloud 凭证" or similar, where direct JSON input is expected), paste the entire content of the validated service account JSON key file.
    3. Fill in the other required Vertex AI configuration fields:
      • Google Cloud Project ID: gen-lang-client-0713546307
      • Google Cloud Region: us-central1
      • Model: gemini-1.5-flash-001 (或您在成功的本地测试中使用的确切 Gemini 模型 ID,例如 gemini-2.5-flash-preview-05-20)
    4. Attempt to save or apply this configuration.
  • What happened after each step (within RooCode):

    • After pasting the JSON and attempting to save/apply (Step 4), RooCode displays an error message: "Incomplete JSON segment at the end."
    • The connection to Vertex AI is not established, and the configuration is not accepted. RooCode may show repeated retry attempts.
  • Verification of Credentials and GCP Setup (performed independently outside of RooCode):

    1. A local Python (v3.x) environment was set up with the google-cloud-aiplatform SDK installed.
    2. The GOOGLE_APPLICATION_CREDENTIALS environment variable was set to the file path of the exact same service account JSON key file used in the RooCode configuration attempt.
    3. A Python script was executed to:
      • Initialize the Vertex AI client using vertexai.init(project='gen-lang-client-0713546307', location='us-central1').
      • Load a GenerativeModel (e.g., GenerativeModel('gemini-1.5-flash-001') or the model specified above).
      • Send a prompt to the model (e.g., model.generate_content("Hello, tell me about yourself.")).
    4. Result of local test: The Python script executed successfully, receiving valid responses from the Gemini model. This confirmed:
      • The service account JSON key is valid and has correct permissions.
      • The Project ID and Region are correct.
      • The specified Vertex AI model is accessible.
      • The Vertex AI API is enabled and functioning correctly for this project and credential.

💥 Outcome Summary

Attempting to configure RooCode's Vertex AI integration by pasting a validated Google Cloud service account JSON key results in an "Incomplete JSON segment at the end" error. This occurs despite the exact same JSON key, Project ID, and Region working perfectly for Vertex AI API calls in an independent local Python SDK test, indicating the issue likely lies with RooCode's JSON credential handling.

📄 Relevant Logs or Errors (Optional)

@alexcz-a11y alexcz-a11y added the bug Something isn't working label May 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label May 27, 2025
@hannesrudolph
Copy link
Collaborator

Repro steps provided look sufficient. This has not been tested inhouse so to the person taking this issue on please verify repro issues prior to employing a fix.

@hannesrudolph hannesrudolph moved this from Triage to Issue [Unassigned] in Roo Code Roadmap May 28, 2025
@hannesrudolph hannesrudolph added Issue - Unassigned / Actionable Clear and approved. Available for contributors to pick up. and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels May 28, 2025
@hannesrudolph hannesrudolph moved this from Issue [Unassigned] to TEMP in Roo Code Roadmap Jun 2, 2025
@daniel-lxs daniel-lxs moved this from TEMP to Issue [Unassigned] in Roo Code Roadmap Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Issue - Unassigned / Actionable Clear and approved. Available for contributors to pick up.
Projects
Status: Issue [Unassigned]
Development

No branches or pull requests

2 participants
0