Skip to content

Doctor: Gemini API key check should use gateway memory-status instead of direct env lookup #18062

@therk

Description

@therk

Bug

openclaw doctor reports a warning when GEMINI_API_KEY is set via environment variables (e.g. in /etc/openclaw/secrets.env) rather than through an openclaw auth add credential:

Memory search provider is set to "gemini" but no API key was found.
Semantic recall will not work without a valid API key.

Fix (pick one):
- Set GEMINI_API_KEY in your environment
- Add credentials: openclaw auth add --provider gemini
- To disable: openclaw config set agents.defaults.memorySearch.enabled false

Problems

  1. The key IS set in the environmentGEMINI_API_KEY is loaded and functional. openclaw memory status --deep confirms Embeddings: ready for all agents.

  2. openclaw auth add does not exist — the suggested fix command errors with unknown command 'auth'.

  3. Doctor should not check for the key directly. It should instead query the gateway's memory search status (which already validates the full pipeline) rather than looking for the key in a specific location.

Expected Behavior

Doctor should call the gateway's memory status endpoint (equivalent to openclaw memory status --deep) and check if embeddings are ready, rather than independently checking for API key presence.

Environment

  • OpenClaw 2026.2.14
  • Memory search provider: gemini
  • Key provided via: /etc/openclaw/secrets.env → environment variable
  • OS: Linux (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions