feat(plugins): add OpenAI-compatible embedding provider#84998
Conversation
|
Codex review: needs real behavior proof before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: not applicable. this is a feature PR, not a current-main bug report. The changed behavior is source-checkable on the branch and covered by fixture-backed tests, but there is no failing current-main path to reproduce. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land this only after the generic contract, memory bridge, and deprecation stack is approved, with redacted real endpoint proof for the request/auth/payload path; otherwise defer the bundled provider until that boundary is settled. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature PR, not a current-main bug report. The changed behavior is source-checkable on the branch and covered by fixture-backed tests, but there is no failing current-main path to reproduce. Is this the best way to solve the issue? Unclear until maintainer approval: the explicit generic-provider plugin is a maintainable shape if the lower stack is accepted, but bundling it should wait for the API, credential boundary, and real endpoint proof to settle. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7f4bd454febf. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
dfdd641 to
c1db010
Compare
a574850 to
3e858f0
Compare
13bf584 to
f185ecb
Compare
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
f185ecb to
63ce84a
Compare
e03b9e8 to
55472fe
Compare
63ce84a to
09d409a
Compare
55472fe to
b25a168
Compare
09d409a to
4923427
Compare
|
Closing this as superseded by #85269. The direction changed during maintainer review: Thanks to this branch for proving the shape; the implementation now lives in core instead. |
Summary
openai-compatible-embeddingsplugin that registers the genericopenai-compatibleembedding provider from feat(plugins): add embedding provider contract #84947.remote.baseUrlandmodel, skips warmup/preload, and does not inherit global OpenAI chat credentials./v1/embeddingsHTTP fixture.Stacked on #85072 and #84991: #84991 adapts memory-core to consume generic embedding providers, and #85072 marks the old memory-specific embedding registration seam as deprecated compatibility.
Verification
Behavior addressed: OpenAI-compatible embedding endpoints can be exposed through the generic
embeddingProviderscontract and then used by memory-core through the generic-provider bridge.Real environment tested: local macOS checkout with HTTP fixture servers; Blacksmith Testbox through Crabbox on Linux (
tbx_01ks62sf86sqjq39v8f7qbs0fm, Actions run https://github.com/openclaw/openclaw/actions/runs/26250560922). Earlier broader Testbox proof also passed ontbx_01ks5qpe8h3jsf46xfk9hhejkdwith Actions run https://github.com/openclaw/openclaw/actions/runs/26240732874. No live third-party endpoint was called.Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/memory-core/src/memory/generic-embedding-provider.bridge.test.ts extensions/memory-core/src/memory/generic-embedding-provider.integration.test.ts extensions/openai-compatible-embeddings/src/embedding-provider.test.ts extensions/memory-core/src/memory/embeddings.test.ts src/plugins/contracts/embedding-provider.contract.test.ts src/plugins/embedding-provider-runtime.test.ts src/plugins/contracts/package-manifest.contract.test.ts src/plugins/contracts/extension-runtime-dependencies.contract.test.ts src/plugins/contracts/inventory/bundled-capability-metadata.test.ts test/plugin-npm-package-manifest.test.ts;node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test-openai-compatible-embeddings.tsbuildinfo; focused local rerun after restack:node scripts/run-vitest.mjs src/plugins/status.test.ts src/plugins/compat/registry.test.ts src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts extensions/openai-compatible-embeddings/src/embedding-provider.test.ts extensions/memory-core/src/memory/generic-embedding-provider.integration.test.ts; Testbox focused rerun with the same 5-file command; focused oxlint/oxfmt checks;git diff --check.Evidence after fix: earlier broader Testbox proof passed 454 Vitest tests; latest local and Testbox focused reruns passed 5 files / 66 tests at head
09d409a0bd; formatting and whitespace checks passed.Observed result after fix: the plugin registers
openai-compatiblethroughapi.registerEmbeddingProvider, memory-core resolves it via the generic registry for explicit provider requests, request payloads include model/input/dimensions withoutencoding_format, explicit bearer auth and non-secret routing headers are preserved, runtime cache metadata is sanitized, structured text inputs pass through, generic providers remain excluded from memoryautoselection, and the old memory-specific seam now reports a deprecation compatibility warning for external/workspace plugins.What was not tested: live provider-specific compatibility with an external OpenAI-compatible service; that should be tested with a real endpoint/API key before declaring broad provider coverage. A direct remote CLI-inspect proof was attempted but stopped because Testbox source build stayed long-running before the inspect step; the real CLI inspect warning proof passed locally.