Skip to content

feat: add Gemini OAuth support for embedding & media APIs#17800

Closed
irchelper wants to merge 2 commits into
openclaw:mainfrom
irchelper:fix/gemini-embedding-oauth
Closed

feat: add Gemini OAuth support for embedding & media APIs#17800
irchelper wants to merge 2 commits into
openclaw:mainfrom
irchelper:fix/gemini-embedding-oauth

Conversation

@irchelper

@irchelper irchelper commented Feb 16, 2026

Copy link
Copy Markdown

Summary

Support OAuth authentication for Gemini embedding and media understanding APIs, so memory search and image/audio analysis work without explicit API keys when using OAuth.

Changes

  1. Gemini Embedding OAuth: Adds OAuth token support to embedding API calls in memory search
  2. Gemini Media OAuth: Adds OAuth token support to media understanding API (image/audio analysis)

Benefits

  • Memory search works seamlessly with OAuth-authenticated Gemini sessions
  • No need to manage separate API keys when OAuth is configured
  • Consistent authentication across all Gemini API features

Fixes #17725 (OAuth part)
Closes #17813

@irchelper irchelper changed the title fix: support OAuth for Gemini embedding API fix: Gemini OAuth support + FTS fallback for memory search Feb 16, 2026
@irchelper irchelper changed the title fix: Gemini OAuth support + FTS fallback for memory search fix: Gemini OAuth (embedding + media) + FTS fallback for memory search Feb 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L channel: telegram Channel integration: telegram gateway Gateway runtime size: XL and removed size: S size: L labels Feb 16, 2026
@irchelper irchelper force-pushed the fix/gemini-embedding-oauth branch from dce76fa to e303e54 Compare February 16, 2026 10:15
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed channel: telegram Channel integration: telegram gateway Gateway runtime size: XL labels Feb 16, 2026
康熙 added 2 commits February 16, 2026 18:16
Add parseGeminiAuth() to detect OAuth JSON format ({"token": "...", "projectId": "..."})
and use Bearer token authentication instead of x-goog-api-key header.

This allows OAuth users (using gemini-cli-auth extension) to use memory_search
with Gemini embedding API.
Extract parseGeminiAuth() to shared infra module and use it in both
embeddings-gemini.ts and inline-data.ts.

Previously, inline-data.ts directly set x-goog-api-key header without
handling OAuth JSON format. Now it properly supports both traditional
API keys and OAuth tokens.
@irchelper irchelper force-pushed the fix/gemini-embedding-oauth branch 2 times, most recently from 7ff793e to 162d4ea Compare February 16, 2026 17:34
@irchelper

Copy link
Copy Markdown
Author

Restructured: split into PR stack for easier review. This PR now contains only OAuth support (commits 1-2). FTS fallback + query expansion moved to a separate dependent PR.

@irchelper irchelper changed the title fix: Gemini OAuth (embedding + media) + FTS fallback for memory search feat: add Gemini OAuth support for embedding & media APIs Feb 16, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed agents Agent runtime and tooling size: L labels Feb 16, 2026
@steipete steipete closed this Feb 16, 2026
@irchelper irchelper deleted the fix/gemini-embedding-oauth branch February 16, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory_search always returns disabled when using OAuth (no embedding API key)

2 participants