OpenClaw Integration

OpenClaw Integration

Use Ask Sage as a custom model provider for the OpenClaw AI agent platform


Table of Contents
  1. Prerequisites
  2. Recommended Plan
  3. Configuration
  4. Full Multi-Provider Configuration
  5. Available Models
  6. Government & DoD Models
  7. Verification
  8. Troubleshooting
  9. Additional Resources

Prerequisites

Prerequisites

Before you begin, ensure you have the following:

Ask Sage Account

Sign up or log in

Ask Sage API Key

Generate from your Account Settings

Ask Sage Subscription

Plan with API access (5M Ultimate recommended)

OpenClaw Installed

Install OpenClaw on your system


Configuration


Full Multi-Provider Configuration


Available Models

Available Models

Below are key models available through Ask Sage, organized by provider API format. Use the Model ID value in your openclaw.json configuration.

Anthropic Models (anthropic-messages)

Model ID Name Context Window Max Tokens Reasoning
google-claude-47-opus Claude 4.7 Opus (via GCP) 1M 128,000
google-claude-46-opus Claude 4.6 Opus (via GCP) 800K 32,768
google-claude-46-sonnet Claude 4.6 Sonnet (via GCP) 800K 32,768
google-claude-45-opus Claude 4.5 Opus (via GCP) 135K 32,768
google-claude-45-sonnet Claude 4.5 Sonnet (via GCP) 135K 32,768
google-claude-45-haiku Claude 4.5 Haiku (via GCP) 135K 32,768
google-claude-4-opus Claude 4 Opus (via GCP) 167K 32,768
google-claude-4-sonnet Claude 4 Sonnet (via GCP) 135K 32,768

OpenAI Models (openai-responses)

Model ID Name Context Window Max Tokens Reasoning
gpt-o4-mini GPT o4 Mini 120K 100,000
gpt-o3 GPT o3 120K 100,000
gpt-o3-mini GPT o3 Mini 120K 65,536
gpt-o1 GPT o1 100K 32,768
gpt-5.4 GPT 5.4 170K 32,768
gpt-5.4-nano GPT 5.4 Nano 170K 32,768
gpt-5.2 GPT 5.2 170K 32,768
gpt-5.1 GPT 5.1 170K 32,768
gpt-5 GPT 5 170K 32,768
gpt-5-mini GPT 5 Mini 170K 32,768
gpt-5-nano GPT 5 Nano 170K 32,768
gpt-4.1 GPT 4.1 1,047K 32,768
gpt-4.1-mini GPT 4.1 Mini 1,047K 32,768
gpt-4.1-nano GPT 4.1 Nano 1,047K 32,768

Google Models (google-generative-ai)

Model ID Name Context Window Max Tokens Reasoning
google-gemini-2.5-pro Gemini 2.5 Pro 924K 65,536
google-gemini-2.5-flash Gemini 2.5 Flash 924K 65,536
google-gemini-2.5-flash-image Gemini 2.5 Flash (Image) 32K 65,536
google-imagen-4 Imagen 4 (Image Generation)
google-veo-3-fast Veo 3 Fast (Video Generation)

Government & DoD Models


Verification

Verification

After registering your providers (via CLI or JSON), verify everything is wired up correctly:

List Configured Models

The fastest check — shows the active default, fallback chain, and any aliases:

openclaw models list

You should see rows like asksage-anthropic/google-claude-47-opus text+image 1024k no yes default,configured. The default tag confirms the primary model and fallback#N tags confirm the failover order.

Check Auth + Provider Health

# Show auth profiles for all providers
openclaw models auth list

# Full status summary (gateway, runtime, model, usage)
openclaw models status

Your Ask Sage providers should appear with auth: yes and a populated last seen timestamp.

Test a Conversation

Start an interactive session to confirm the model responds correctly:

# Start OpenClaw and send a test message
openclaw start

If the agent responds, your Ask Sage integration is working correctly.


Troubleshooting

Troubleshooting

Issue: "Invalid API key" or authentication errors

Solutions:

  • Verify your API key is correct — copy it again from your Account Settings
  • Check that the apiKey field in openclaw.json has no extra spaces or line breaks
  • Ensure your Ask Sage subscription is active and includes API access
Issue: "Model not found" errors

Solutions:

  • Verify the id in your model definition matches a valid Ask Sage model ID
  • Check that you're using the correct API format for the model (e.g., Claude models use anthropic-messages, not openai-responses)
  • Government models require a government tenant — commercial API keys cannot access -gov models
Issue: Request timeouts

Solutions:

  • Check your network connectivity to api.asksage.ai
  • Verify no firewall rules are blocking outbound HTTPS connections
  • Reasoning models (e.g., google-claude-46-sonnet with extended thinking) may take longer — increase timeout values in OpenClaw's configuration if needed
Issue: Provider not appearing in openclaw status

Solutions:

  • Validate your openclaw.json is valid JSON (use jq . openclaw.json to check), or just use openclaw config validate
  • Ensure the provider is under models.providers, not at the root level
  • Most changes hot-reload automatically. If they don't, restart the gateway: openclaw gateway restart
Issue: openclaw config set rejects with size-drop, clobbered, or protected-paths (2026.5+)

Why: OpenClaw 2026.5 added safety guards around the model-provider section because the gateway auto-discovers and enriches model metadata at runtime. Replacing a whole provider block with a smaller hand-written one will look like a drop. Editing the file directly while the gateway is running will look like a clobber. Renaming a model id, swapping an API key, or rewriting an api compatibility string in-place trips protected-paths.

Solutions:

  • Use the openclaw models CLI for default/fallback/alias changes — it never trips guards
  • Use openclaw onboard --auth-choice custom-api-key to add or re-auth a provider — bypasses protected-paths
  • For larger refactors, stop the gateway first (openclaw gateway stop), edit, then restart
  • Rejected payloads are saved to ~/.openclaw/openclaw.json.rejected.<timestamp> and the previous good copy to openclaw.json.last-good — diff them to see what the guard caught
Need Help? If you can't resolve the issue, reach out to support@asksage.ai.

Additional Resources

Documentation & Resources

Have Questions? Reach out to us at support@asksage.ai

Back to top

Copyright © 2026 Ask Sage Inc. All Rights Reserved. Ask Sage is a BigBear.ai company.