Skip to content

[BUG] gemini-embedding models do not work via Vertex API#2376

Description

@Gentoli

馃搵 Prerequisites

  • I have searched the existing issues to avoid creating a duplicate
  • By submitting this issue, you agree to follow our Code of Conduct
  • I am using the latest version of the software
  • I have tried to clear cache/cookies or used incognito mode (if ui-related)
  • I can consistently reproduce this issue

馃幆 Affected Service(s)

App Service

馃殾 Impact/Severity

Blocker

馃悰 Bug Description

In python ADK, vertex_ai is the wrong id for provider configured via k8s. The provider id should be gemini_vertex_ai matching the ModelConfig

if provider in ("vertex_ai", "gemini"):

馃攧 Steps To Reproduce

  1. create new ModelConfig with vertex ai embedding model
  2. create agent with memory
  3. ask agent to save memory

馃 Expected Behavior

agent saves memory

馃摫 Actual Behavior

memory save fails silently, but log shows it has failed to call embedding

馃捇 Environment

  • Kagent: 0.9.12
  • ADK image: cr.kagent.dev/kagent-dev/kagent/app:0.9.12

馃敡 CLI Bug Report

No response

馃攳 Additional Context

No response

馃搵 Logs

2026-07-31 22:57:54,501 - kagent.adk.models._embedding - WARNING - Unknown embedding provider 'gemini_vertex_ai'; attempting OpenAI-compatible call.
2026-07-31 22:57:54,501 - kagent.adk.models._embedding - ERROR - Error generating embedding with provider=gemini_vertex_ai model=gemini-embedding-2: Missing credentials. Please pass an `api_key`, `workload_identity`, `admin_api_key`, or set the `OPENAI_API_KEY` or `OPENAI_ADMIN_KEY` environment variable.
2026-07-31 22:57:54,501 - kagent.adk._memory_service - WARNING - Failed to generate embedding for search query

馃摲 Screenshots

No response

馃檵 Are you willing to contribute?

  • I am willing to submit a PR to fix this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions