Repository navigation
fix(memory): restore embeddings with Codex OAuth - #160878
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 8:36 PM ET / October 2, 2026, 00:36 UTC (Revision 3). ClawSweeper reviewWhat this changesThe OpenAI plugin allows eligible stored Codex OAuth credentials for memory embeddings, updates existing credential-selection coverage, and documents account-dependent access. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main and the latest release still reject ordinary OAuth embedding credentials before HTTP. The focused repair has sufficient reported live proof, verified maintainer approval, and no actionable correctness findings. Priority: P2 Review scores
Verification
How this fits togetherMemory indexing and semantic search send text to an embedding provider. The OpenAI plugin selects compatible stored credentials before the shared HTTP client requests vectors used by memory search. flowchart LR
A[Memory text or search query] --> B[OpenAI embedding provider]
C[Stored credentials] --> D[Credential eligibility policy]
B --> D
D -->|Compatible credential| E[Embedding HTTP request]
D -->|Unsupported grant| F[Authentication error]
E --> G[Vectors for memory search]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +4, Docs +4. Total +11 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the existing provider-owned policy to admit account-authorized OAuth embeddings while retaining unsupported-grant rejection and unchanged credential storage. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes that ordinary OAuth-only native embedding selection fails before HTTP on current main; the contributor also reports this through memory status --deep. This review did not execute target code. Is this the best way to solve the issue? Yes, refining the existing OpenAI credential policy is the narrowest repair and preserves the independently enforced grant and endpoint distinctions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9a455598ddca. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Maintainer decision: support stored Codex OAuth credentials for native OpenAI embeddings when the account grants access. Patrick approved this direction and landing; keep the separate SIWC token-sharing and identity-only rejection, native static-token rejection, and model-route compatibility checks. This is an OpenClaw credential-selection decision. It does not claim that the Codex CLI itself implements embeddings or that every OAuth account has access. Pre-merge verification for
CI follow-up: rerunning the Sep 29 workflow switched the fork job to GitHub-hosted execution with two compiler workers. Both package-boundary compile (126 plugins) and canary commands printed success, but the job exceeded its 20-minute budget and GitHub cancelled it. This is recorded as a fork-rerun capacity/budget follow-up, not an embeddings failure. An empty commit starts the normal CI path again without changing source or rewriting contributor history. The new normal CI run completed successfully, including the boundary check on its intended 32-vCPU runner and required openclaw/ci-gate. ClawSweeper revision 3 also reviewed the new head with no actionable findings or before-merge steps. |
|
🦞👀 Re-review progress:
|
Restart the normal CI path after the fork rerun used two compiler workers and exceeded the package-boundary job budget. No source changes.
|
Merged via squash.
|
* fix(memory): restore embeddings with Codex OAuth * chore(ci): refresh embeddings validation Restart the normal CI path after the fork rerun used two compiler workers and exceeded the package-boundary job budget. No source changes. --------- Co-authored-by: astra-openclaw <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]>
What Problem This Solves
Fixes memory search failing with
No API key found for provider "openai"after an update when the configured Codex OAuth account already has working embedding access.Related: #159920.
User Impact
Eligible accounts can continue using their existing OpenClaw-stored Codex OAuth profile for memory indexing and semantic search. No configuration change or reauthentication is required. Embedding access remains subject to the account's permissions.
Why This Change Was Made
The embedding capability filter rejects ordinary Codex OAuth before sending a request, even when the endpoint accepts that credential. Exempt Codex OAuth from that API-key-only check while preserving the separate Sign in with ChatGPT token-sharing and identity-only grant restrictions, native static-token rejection, and model-route compatibility checks. Update the existing credential-selection regression and the affected documentation.
Evidence
openclaw memory status --deep: credential resolution failed before HTTP. The updated regression also failed on the original code, with the other 25 cases passing./v1/embeddingsfor synthetic input, usingtext-embedding-3-smalland returning one 1,536-dimensional vector. No credentials or private input are included here.memory status --deepreported a successful embedding probe, semantic search available, and valid index identity. A gatewaytools.invokecall tomemory_searchreturned three results with the expected OpenAI provider and embedding model.embedding-provider.test.ts,provider-auth.contract.test.ts, andmemory-embedding-adapter.test.ts. The standalone embedding file was checked again on September 29: 26 passed, 50.17 s Vitest duration / 52.15 s wrapper wall time. This changes an expectation in an existing case; no new fixture or test case is added. Approximately 15 s was test execution, with most remaining time in compilation/imports for the existing provider/auth integration fixture.git diff --checkpassed. Auto Review completed with no actionable P0 findings.The runtime and live checks used base
7526f600cf1. The PR was rebased onto4ddd0e33973to resolve one documentation-table conflict; the production and test files remain byte-identical to the validated fix. The newer authentication documentation was preserved with only the embedding/TTS row split. Full-repository suites were not run; these results do not claim current-head CI coverage.