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

Instance-Specific Base URL: The endpoints and configuration shown reflect the instance at chat.asksage.ai. The api. prefix and path suffix stay the same across deployments — only the instance segment in the middle changes based on which Ask Sage instance you are logging into. Always use the instance approved by your organization and applicable regulatory requirements, and match the base URL in your configuration to the instance you authenticate against.


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 — this page is written against 2026.9.4

Node 24.16+ or 26.1+

Node 26 recommended. Upgrade Node before OpenClaw

Upgrade Node before you upgrade OpenClaw. Current releases require Node 24.16.0+ on the 24.x line, or Node 26.1.0+ (26 is recommended). Node 22, Node 25, and earlier 24.x/26.x builds are no longer supported, and running OpenClaw on one can cause SQLite text truncation — silent data damage rather than a clean startup failure. Do the Node upgrade first, then OpenClaw.
OpenClaw moves fast — check your version before following this page. Releases use calendar versioning (YYYY.M.PATCH), and since June 2026 the patch number is a monthly counter rather than a calendar day. Breaking changes accumulate across releases: if you are jumping several versions, you must work through all of them, not just the newest. Run openclaw doctor to detect pending migrations and validate your config, and use the updater's dry-run mode when skipping three or more releases.

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.

This table is a snapshot — your instance is authoritative. Ask Sage adds and retires models continuously, and the set available to you is filtered by what your deployment has activated and by any administrator restrictions. List what you can actually reach with curl -s https://api.asksage.ai/server/openai/v1/models | jq '.data[].id' (no credential needed), and re-discover a provider catalog inside OpenClaw with openclaw models auth login --provider asksage-anthropic.</p>

Anthropic Models (anthropic-messages)

Model ID Name Context Window Max Tokens Reasoning
google-claude-opus-5 Claude Opus 5 (via GCP) 1M 128,000
google-claude-sonnet-5 Claude Sonnet 5 (via GCP) 200K 64,000
aws-bedrock-claude-fable-5-1-gov Claude Fable 5.1 (Bedrock Gov) 1M 64,000
google-claude-48-opus Claude 4.8 Opus (via GCP) 1M 128,000
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-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-6-astra GPT-6 Astra 272K 128,000
gpt-5.6-sol GPT 5.6 Sol 272K 128,000
gpt-5.6-terra GPT 5.6 Terra 272K 128,000
gpt-5.6-luna GPT 5.6 Luna 272K 128,000
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-3.1-pro-com Gemini 3.1 Pro 1M 65,536
google-gemini-3.5-flash-com Gemini 3.5 Flash 1M 65,536
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-opus-5 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-sonnet-5 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.