openclaw - 💡(How to fix) Fix [Feature]: Route memory embeddings through Codex OAuth runtime for ChatGPT subscribers

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Users authenticated with OpenAI Codex OAuth (ChatGPT Plus/Pro/Team subscribers) cannot use OpenAI embeddings for memory search. The openai memory provider requires a direct API key (OPENAI_API_KEY), which is billed separately via pay-as-you-go — defeating the purpose of having an OAuth subscription.

Root Cause

Users authenticated with OpenAI Codex OAuth (ChatGPT Plus/Pro/Team subscribers) cannot use OpenAI embeddings for memory search. The openai memory provider requires a direct API key (OPENAI_API_KEY), which is billed separately via pay-as-you-go — defeating the purpose of having an OAuth subscription.

Fix Action

Workaround

Use a non-OpenAI embedding provider that supports API key auth:

"memorySearch": {
  "provider": "gemini",
  "model": "gemini-embedding-001"
}

Code Example

Memory search failed: No API key found for provider "openai". You are authenticated
  with OpenAI Codex OAuth; OpenAI agent model runs use openai/gpt-* through the Codex
  runtime. Set OPENAI_API_KEY only for direct OpenAI API-key surfaces.

---

"memorySearch": {
  "provider": "gemini",
  "model": "gemini-embedding-001"
}
RAW_BUFFERClick to expand / collapse

Summary

Users authenticated with OpenAI Codex OAuth (ChatGPT Plus/Pro/Team subscribers) cannot use OpenAI embeddings for memory search. The openai memory provider requires a direct API key (OPENAI_API_KEY), which is billed separately via pay-as-you-go — defeating the purpose of having an OAuth subscription.

Current Behavior

  • Chat completions route through the Codex runtime via OAuth (openai:[email protected] with mode: "oauth")
  • Memory embedding calls (memorySearch.provider: "openai") fail with:
    Memory search failed: No API key found for provider "openai". You are authenticated
    with OpenAI Codex OAuth; OpenAI agent model runs use openai/gpt-* through the Codex
    runtime. Set OPENAI_API_KEY only for direct OpenAI API-key surfaces.

Expected Behavior

memorySearch.provider: "openai" should work with Codex OAuth profiles by routing /v1/embeddings calls through the Codex runtime proxy, the same way chat completions are routed today.

Context

  • PR #85269 (shipped in v2026.5.27) added the core openai-compatible embedding provider, but it still requires API key auth
  • OAuth users must fall back to alternative providers (e.g. Gemini) for memory embeddings
  • The Codex runtime already proxies chat completions for OAuth users — extending this to the embeddings endpoint would unify the auth story

Proposed Solution

The Codex runtime (or the OpenAI plugin's embedding adapter) should detect when the active auth profile is OAuth-mode and route embedding requests through the same proxy path used for completions, rather than requiring a separate OPENAI_API_KEY.

Workaround

Use a non-OpenAI embedding provider that supports API key auth:

"memorySearch": {
  "provider": "gemini",
  "model": "gemini-embedding-001"
}

Environment

  • OpenClaw v2026.5.27
  • Raspberry Pi 4 (ARM64, Debian bookworm)
  • Auth profile: openai:[email protected] with mode: "oauth"

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING