openclaw - ✅(Solved) Fix [Feature]: openclaw models status --probe --all — per-model health check across all configured models [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63145Fetched 2026-04-09 07:57:51
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
cross-referenced ×2referenced ×2labeled ×1

Add a --all flag to models status --probe that sends a real completion request to every configured model (primary + fallbacks) and reports per-model health, not just per-provider auth.

Error Message

❌ openrouter/openai/gpt-5.4 error (400: model not found) Each entry should include: model, provider, status (ok | rate_limited | error | timeout | no_auth), latencyMs, httpStatus, message.

Root Cause

  1. Deprecated/removed models go undetected — A model like openai/gpt-5.4 can sit in config returning 400s, and --probe will still report the provider as healthy because the API key is valid.

Fix Action

Fix / Workaround

The only workaround today is manually curling each model endpoint or writing a bash loop — which requires knowing each provider's API format and isn't integrated with OpenClaw's config resolution.

Workaround used:

for model in $(grep -oP 'openrouter/\S+' config.yaml); do
  curl -s -o /dev/null -w "%{http_code}" \
    -H "Authorization: Bearer $OPENROUTER_API_KEY" \
    -d '{"model":"'$model'","messages":[{"role":"user","content":"hi"}],"max_tokens":1}' \
    https://openrouter.ai/api/v1/chat/completions
  echo " $model"
done

This works but shouldn't be necessary.

PR fix notes

PR #63259: CLI: add --all flag to models status --probe for per-model health check

Description (problem / solution / changelog)

Summary

  • Add --all flag to openclaw models status --probe that probes every configured model individually, not just one per provider
  • Catches deprecated/renamed model IDs that pass auth-only validation because the API key is valid

Problem

models status --probe validates provider auth by picking one representative model per provider via selectProbeModel(). This means:

  • Deprecated models (e.g., openai/gpt-5.4 on OpenRouter) sit in config returning 400s undetected
  • Fallback chain health is invisible — broken fallback models only surface when the primary fails
  • Users with 10-15+ models across tiers have no pre-flight check for the full config

Changes

  • src/cli/models-cli.ts: Register --all flag, pass probeAll to command handler
  • src/commands/models/list.status-command.ts: Pass probeAll through to runAuthProbes options
  • src/commands/models/list.probe.ts: Add probeAll to AuthProbeOptions; when set, iterate all candidate models for each provider instead of picking one via selectProbeModel()

Usage

# Probe every configured model
openclaw models status --probe --all

# Probe all models under a specific provider
openclaw models status --probe --all --probe-provider openrouter

# Existing behavior unchanged
openclaw models status --probe

Backward compatibility

  • --probe without --all behaves exactly as before (one model per provider)
  • --all without --probe is a no-op (probing must be enabled)
  • All existing CLI flags (--probe-provider, --probe-timeout, --probe-concurrency, --probe-max-tokens) work with --all

Test plan

  • openclaw models status --probe — unchanged output (one model per provider)
  • openclaw models status --probe --all — shows every configured model with individual status
  • openclaw models status --probe --all --probe-provider anthropic — filters to one provider
  • openclaw models status --probe --all --json — JSON output includes all model results
  • Verify deprecated model IDs show error / no_model status instead of being hidden

Implements #63145.

Changed files

  • src/cli/models-cli.ts (modified, +6/-0)
  • src/cli/program/route-args.ts (modified, +1/-0)
  • src/commands/models/list.probe.ts (modified, +47/-25)
  • src/commands/models/list.status-command.ts (modified, +5/-0)

Code Example

openclaw models status --probe --all

---

for model in $(grep -oP 'openrouter/\S+' config.yaml); do
  curl -s -o /dev/null -w "%{http_code}" \
    -H "Authorization: Bearer $OPENROUTER_API_KEY" \
    -d '{"model":"'$model'","messages":[{"role":"user","content":"hi"}],"max_tokens":1}' \
    https://openrouter.ai/api/v1/chat/completions
  echo " $model"
done
RAW_BUFFERClick to expand / collapse

Summary

Add a --all flag to models status --probe that sends a real completion request to every configured model (primary + fallbacks) and reports per-model health, not just per-provider auth.

Problem to solve

models status --probe currently validates provider authentication, not individual model IDs. This means:

  1. Deprecated/removed models go undetected — A model like openai/gpt-5.4 can sit in config returning 400s, and --probe will still report the provider as healthy because the API key is valid.

  2. Fallback chain health is invisible — If your primary model fails and OpenClaw falls back to a model that's deprecated or rate-limited, the entire chain breaks silently. There's no way to pre-validate the fallback sequence.

  3. Multi-model configs are increasingly common — Users on OpenRouter routinely configure 10-15+ models across tiers (primary, fallbacks, image models). The current probe tests one model per provider, leaving the rest unchecked.

The only workaround today is manually curling each model endpoint or writing a bash loop — which requires knowing each provider's API format and isn't integrated with OpenClaw's config resolution.

Proposed solution

Add --all flag to openclaw models status --probe:

openclaw models status --probe --all

Behavior:

  • Iterate over every model in agents.defaults.model.primary, agents.defaults.model.fallbacks, and agents.defaults.imageModel (plus per-agent overrides if --agent is specified)
  • Send a minimal completion request (e.g., max_tokens: 1, prompt: "hi") to each model ID through the configured provider
  • Report per-model status:

✅ anthropic/claude-opus-4-6 ok (1.2s) ✅ openrouter/deepseek/deepseek-v3 ok (0.8s) ⚠️ openrouter/google/gemini-3.1-pro rate_limited (429, retry: 30s) ❌ openrouter/openai/gpt-5.4 error (400: model not found) ❌ openrouter/moonshot/kimi-k2.5 timeout (10.0s)

JSON output (--json): Each entry should include: model, provider, status (ok | rate_limited | error | timeout | no_auth), latencyMs, httpStatus, message.

Scope options:

  • --probe --all — every configured model
  • --probe --all --provider openrouter — only models under a specific provider
  • --probe (current behavior unchanged) — primary model / auth check only

Timeout: Respect existing probe timeout, or allow --probe-timeout <seconds>.

Alternatives considered

  1. Bash loop with curl — Works but requires per-provider API knowledge, doesn't read from OpenClaw config, and isn't portable across setups. Not realistic for most users.

  2. openclaw models scan --probe — This exists for OpenRouter's free catalog discovery, but it probes available models on the provider, not your configured models. Different use case.

  3. External monitoring (UptimeRobot, cron scripts) — Overkill for config validation. Users just want a pre-flight check, not ongoing monitoring.

  4. Probe on first use (lazy validation) — Would catch broken models at runtime, but by then the user is already mid-conversation and hitting errors. Pre-flight is better UX.

Impact

Affected users: Anyone running multiple models — especially OpenRouter users who configure 5-15+ models across providers and tiers. Also affects multi-agent setups where different agents use different models.

Severity: Blocks workflow silently. A broken fallback model means the entire failover chain is compromised without any warning. Users discover it only when their primary goes down and the fallback also fails.

Frequency: Every time a provider deprecates or renames a model — which on OpenRouter happens regularly. Also relevant after config changes, migrations, or upgrades.

Consequence:

  • Silent downtime when fallbacks are needed most
  • Wasted debugging time tracing 400/404 errors back to a stale model ID
  • False confidence in config health after --probe passes

Evidence/examples

Related issues:

  • #12215 — "Model Ping / Health Check" feature request (same pain, broader scope)
  • #42401 — Expose rate-limit headroom in probe results
  • #41874 — --probe returning "LLM request timed out" with unclear errors

Real scenario (today):

  • 12 models configured via OpenRouter
  • openclaw models status --probe → all green (auth valid)
  • Manual curl to openai/gpt-5.4 → 400 (model deprecated on OpenRouter)
  • Model was silently broken in config for unknown duration

Workaround used:

for model in $(grep -oP 'openrouter/\S+' config.yaml); do
  curl -s -o /dev/null -w "%{http_code}" \
    -H "Authorization: Bearer $OPENROUTER_API_KEY" \
    -d '{"model":"'$model'","messages":[{"role":"user","content":"hi"}],"max_tokens":1}' \
    https://openrouter.ai/api/v1/chat/completions
  echo " $model"
done

This works but shouldn't be necessary.

Additional information

  • Happy to help test a PR if someone picks this up
  • The openclaw models scan probe logic already sends real completion requests to validate tool/image support — similar infrastructure could be reused here for --probe --all
  • Would pair well with #42401 (rate-limit headers) if probe responses also surfaced rate-limit headroom
  • OpenClaw version: 2026.2.26

extent analysis

TL;DR

Implementing the proposed --all flag for openclaw models status --probe will allow users to validate the health of all configured models, including primary and fallback models, by sending a real completion request to each model ID.

Guidance

  • To address the issue, add the --all flag to openclaw models status --probe to iterate over every model in the configuration and send a minimal completion request to each model ID.
  • The proposed solution should report per-model status, including latency, HTTP status, and error messages, to help users identify broken or deprecated models.
  • Consider reusing the existing probe logic from openclaw models scan to validate tool/image support for the new --probe --all functionality.
  • To verify the fix, test the --all flag with various model configurations, including primary and fallback models, to ensure that the probe correctly reports the health of each model.

Example

openclaw models status --probe --all

This command should send a minimal completion request to each configured model ID and report the per-model status, including latency, HTTP status, and error messages.

Notes

  • The proposed solution assumes that the existing probe timeout is respected, or a new --probe-timeout option is introduced to allow users to configure the timeout.
  • The solution may not apply to users with very large model configurations, where the probe request may take a significant amount of time to complete.

Recommendation

Apply the workaround by implementing the proposed --all flag for openclaw models status --probe, as it provides a comprehensive solution to the problem of validating the health of all configured models. This approach allows users to pre-flight check their model configurations, reducing the risk of silent downtime and wasted debugging time.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING