Skip to content

openclaw infer embedding create fails with TypeError: fetch failed on Node 24 despite valid Voyage credential; underlying cause is swallowed #73713

Description

@crsnpalmer-art

Environment:

Relevant bundle artifacts:

  • dist/embedding-provider-gC07tS5j.js - 63 lines, sha256 739a2dd8587959f11d594b3af99b083b060577716295e4ab7c71aec15c8cb003
  • dist/memory-core-host-engine-embeddings-r1-dacIT.js - 461 lines, sha256 4d80fff73c1759cb319705f3193b859b7629aff5a4afc834c4aa43f316155b63
  • postJson starts at memory-core-host-engine-embeddings-r1-dacIT.js:112

Observed:

  • Direct Node fetch to Voyage embeddings with VOYAGE_API_KEY returns HTTP 200 and 1024-dim vectors.
  • openclaw infer embedding create --provider voyage --text 'probe' --json exits with only TypeError: fetch failed.\n- NODE_OPTIONS='--dns-result-order=ipv4first' does not change the failure.\n- OPENCLAW_DEBUG_MEMORY_EMBEDDINGS=1 does not add useful output; it still exits with only TypeError: fetch failed.\n- Gateway logs also show provider fetch failures such as OpenRouter pricing fetch failures.\n\nImportant diagnostic:\n- Passing OpenClaw runtime [email protected] Agent to Node 24 global fetch reproduces InvalidArgumentError: invalid onRequestStart method, code UND_ERR_INVALID_ARG.\n- However, the installed fetchWithSsrFGuard appears to route dispatcher calls through bundled runtime undici.fetch, and direct guarded Voyage controls succeed.\n- So the embedding CLI failure may be from a provider path that bypasses that runtime-fetch fallback, passes a custom fetchImpl, or otherwise loses the underlying cause.\n\nExpected:\n- Embedding CLI should succeed when the same key/request succeeds through direct fetch and guarded fetch.\n- If fetch fails, CLI should surface error.cause / UND_ERR_* details instead of only TypeError: fetch failed.\n\nAsk:\n- Please audit the infer embedding create / Voyage provider path for any global-fetch + runtime-dispatcher mixing or custom fetchImpl path.\n- Please preserve/log the underlying fetch cause for provider embedding failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions