Skip to content

ADC Issue: Allow GCP ADC and cloud IAM auth without requiring static VERTEX_AI_API_KEY #251

Description

@datasherlock

Description

When configuring OpenKB to use Google Cloud Vertex AI (vertex_ai/gemini-3.8-flash) using standard GCP Application Default Credentials (ADC) rather than a static API key, I get the below error:

1. PageIndexError: API key not configured for provider 'vertex_ai'

  • What happens: Running openkb add or initializing PageIndexClient triggers _validate_llm_provider in pageindex, which enforces a static VERTEX_AI_API_KEY env var.
  • Expected behavior: Cloud providers that authenticate via ADC / IAM (vertex_ai) should be recognized as credentialed without demanding a static API key.
  • Additionally, OpenKB's CLI prints a false Warning: No LLM API key found for these providers.

We have resolved this locally by:
Hooking PageIndexClient._validate_llm_provider to allow ADC/IAM cloud providers.
Updating _KEYLESS_OR_CLOUD_PROVIDERS in cli.py to prevent false missing-key warnings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions