← Back to Skills Marketplace
viratkumar123

model-troubleshooter

by Viratkumar123 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
46
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install model-troubleshooter
Description
Automatically diagnose and fix model-related errors in OpenClaw/AutoClaw including API issues, timeouts, config errors, and gateway problems.
README (SKILL.md)

Model Troubleshooter Skill

PURPOSE

OpenClaw/AutoClaw mein model-related issues ko automatically identify aur permanently resolve karega.

TRIGGERS

Use when user mentions:

  • "model error", "JSON parsing error", "API error"
  • "model not working", "model timeout", "connection failed"
  • "Unexpected end of JSON", "model switched", "bad model response"
  • Model configuration issues
  • API authentication failures

DIAGNOSIS FLOW

Step 1: Collect Context

# Check current model
/whoami

# Check gateway logs
Get-Content "C:\Users\IDL\.openclaw-autoclaw\logs\gateway.log" -Tail 50

# Check config
openclaw config.get models

Step 2: Identify Issue Type

Error Pattern Likely Cause Fix
"Unexpected end of JSON" Incomplete streaming chunks Restart gateway + enable chunk validation
"401 Unauthorized" API key expired/wrong Update openclaw.json with fresh key
"429 Too Many Requests" Rate limit hit Switch model or implement retry logic
"timeout" Model too slow Switch to faster model (GLM-5-Turbo)
"connection refused" Network/endpoint down Check provider status + failover model
"model not found" Invalid model ID Validate model exists in config

Step 3: Apply Fixes

Fix A: Gateway Restart (Quick Fix)

# Trigger graceful restart
openclaw gateway restart

Fix B: Model Switch (Permanent Fix)

If current model consistently fails:

  1. Check available models: openclaw config.get models.providers
  2. Switch to reliable fallback:
    {
      "agents": {
        "defaults": {
          "model": {
            "primary": "zai/zai_glm-5-turbo"
          }
        }
      }
    }
    
  3. Apply config: openclaw config.patch

Fix C: API Key Refresh

  1. Get fresh API key from provider
  2. Update in openclaw.json:
    {
      "models": {
        "providers": {
          "custom_xxx": {
            "apiKey": "NEW_KEY_HERE"
          }
        }
      }
    }
    

Fix D: Streaming Chunk Validation

Add retry logic to handle incomplete chunks:

  • Enable agents.defaults.compaction.reserveTokensFloor: 40000
  • Set timeout: agents.defaults.timeoutSeconds: 1800

Step 4: Verify Fix

# Test model response
openclaw sessions.list --limit 1

# Confirm no errors in next 5 minutes
Get-Content "C:\Users\IDL\.openclaw-autoclaw\logs\gateway.log" -Tail 100 | Select-String -Pattern "error" -CaseSensitive:$false

AVAILABLE MODELS (Ranked by Reliability)

Tier 1: Most Reliable

  • zai/zai_glm-5-turbo - Fast, stable
  • zai/zai_glm-5.1 - Balanced performance
  • minimaxai/minimax-m2.7 - Good for complex tasks

Tier 2: Medium Reliability

  • qwen/qwen3.5-122b-a10b - Powerful but occasional timeouts
  • deepseek-ai/deepseek-v4-pro - Good reasoning, rate limits

Tier 3: Less Reliable

  • poolside/laguna-m.1:free - Free but unstable
  • openrouter/owl-alpha - Variable performance

COMMON FIXES IN ORDER

  1. Gateway Restart -> Fixes 60% of transient errors
  2. Model Switch -> Fixes provider-specific issues
  3. API Key Refresh -> Fixes auth errors
  4. Timeout Increase -> Fixes slow response errors
  5. Compaction Adjustments -> Fixes context overflow

RESPONSE TEMPLATE

When model issue detected:

[MODEL ISSUE DETECTED]

Error: [specific error message]
Model: [current model]
Root Cause: [diagnosis]

Fix Applied:
- [action taken]
- Status: [success/fail]

Recommendation: [future prevention tip]

Want me to switch to a more reliable model?
- GLM-5-Turbo (fast/stable)
- GLM-5.1 (balanced)
- MINIMAX M2.7 (complex tasks)

RED LINES

  • Never expose API keys in logs/messages
  • Always confirm before switching providers
  • Don't disable safety checks during troubleshooting
  • Preserve user's preferred model if possible

RELATED SKILLS

  • gateway config management
  • sessions_spawn for isolated testing
  • exec for CLI operations
Usage Guidance
Before installing, understand that the skill may guide your agent to inspect OpenClaw logs, restart the gateway, change model settings, and update API-key configuration. Confirm those changes before applying them, adapt the hard-coded Windows log path if needed, and never paste real API keys into chat or logs.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The skill's instructions match its stated purpose: diagnose model/API/timeouts/authentication failures and guide fixes such as gateway restart, model switch, timeout changes, and API key refresh.
Instruction Scope
It asks the agent to read local OpenClaw logs and apply configuration changes, including API-key-related configuration, but these actions are disclosed and paired with user-safety constraints such as not exposing keys and confirming provider switches.
Install Mechanism
The artifact contains only one non-executable markdown file and declares no dependencies, scripts, package installs, or automatic setup behavior.
Credentials
The Windows-specific log path and OpenClaw CLI commands are proportionate for troubleshooting, though users may need to adapt the path and confirm commands before use.
Persistence & Privilege
No background workers, startup persistence, privilege escalation, or hidden credential/session access were found; persistent impact is limited to user-directed OpenClaw configuration changes.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install model-troubleshooter
  3. After installation, invoke the skill by name or use /model-troubleshooter
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release—automatically diagnose and resolve model-related issues in OpenClaw/AutoClaw: - Detects common errors such as model errors, JSON/API errors, timeouts, and authentication failures. - Guides through context collection, error diagnosis, and step-by-step permanent fixes (gateway restart, model switch, API key update, timeout/config tweaks). - Ranks available models by reliability and offers recommendations to minimize recurring issues. - Includes a response template to communicate issues, actions taken, and prevention tips. - Emphasizes user safety: no API key leakage, provider confirmation, and preservation of model preferences.
Metadata
Slug model-troubleshooter
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is model-troubleshooter?

Automatically diagnose and fix model-related errors in OpenClaw/AutoClaw including API issues, timeouts, config errors, and gateway problems. It is an AI Agent Skill for Claude Code / OpenClaw, with 46 downloads so far.

How do I install model-troubleshooter?

Run "/install model-troubleshooter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is model-troubleshooter free?

Yes, model-troubleshooter is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does model-troubleshooter support?

model-troubleshooter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created model-troubleshooter?

It is built and maintained by Viratkumar123 (@viratkumar123); the current version is v1.0.0.

💬 Comments