Skip to content

[Bug]: Warning Message When Selecting a Model with API KEY Not Configured is Not Helpful #31544

@arjunaskykok

Description

@arjunaskykok

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Warning message when selecting a new model but API key not configured is not helpful.

Steps to reproduce

  1. In console, run openclaw tui.
  2. Run /model.
  3. Choose google/gemini-3-flash-preview.
  4. Run any query.

Expected behavior

We should have a helpful warning message. Something like "Oh, you want to use Gemini 3 Flash Preview? Why don't you set up GEMINI_API_KEY in ~/.openclaw/openclaw.json?"

Better if we can provide the UI to fill the necessary API key. After choosing the model, it would pop up the input field for the API key.

Actual behavior

You'll get this warning:

⚠️ Agent failed before reply: All models failed (2): google/gemini-3-flash-preview: No API key found for provider
 "google". Auth store: /home/arjuna/.openclaw/agents/main/agent/auth-profiles.json (agentDir:
 /home/arjuna/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy
 auth-profiles.json from the main agentDir. (auth) | openai-codex/gpt-5.3-codex: OAuth token refresh failed for
 openai-codex: Failed to refresh OAuth token for openai-codex. Please try again or re-authenticate. (auth).
 Logs: openclaw logs --follow
Image

OpenClaw version

2026.3.1

Operating system

Ubuntu 24.04

Install method

curl -fsSL https://openclaw.ai/install.sh | bash

Logs, screenshots, and evidence

Impact and severity

Severity: Low
Consequence: People would be confused / frustrated

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions