← Back to Skills Marketplace
mattheliu

ernie-integration

by Mattheliu · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ⚠ suspicious
287
Downloads
0
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install ernie-integration
Description
Step-by-step guide for integrating Baidu ERNIE 5.0 (Qianfan) models into Clawdbot. Use when someone asks how to add ERNIE models, configure Baidu Qianfan, or...
README (SKILL.md)

ERNIE Model Integration

Complete guide for adding Baidu ERNIE 5.0 (Qianfan) models to Clawdbot.

Overview

ERNIE 5.0 is Baidu's latest large language model with deep thinking capabilities:

  • ERNIE 5.0 (ernie-5.0-thinking-preview) - Advanced reasoning model with 128K context window via OpenAI-compatible API

Prerequisites

  • Clawdbot installed and configured
  • API key from Baidu Qianfan platform (see Getting API Key section)

Getting API Key

Baidu Qianfan Platform

  1. Visit https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application
  2. Register a Baidu Cloud account if you don't have one
  3. Navigate to the API Keys section
  4. Create a new API key
  5. Copy the key (format: bce-v3/ALTAK-...)

Note: The API key uses Baidu's BCE authentication format.

Integration Steps

Step 1: Set environment variable

Add to ~/.bashrc or ~/.zshrc for persistence:

export ERNIE_API_KEY="bce-v3/ALTAK-your-key-here"
source ~/.zshrc  # or source ~/.bashrc

Security note: Never commit API keys to version control. Rotate keys regularly on the Qianfan console.

Step 2: Add provider configuration

Edit your clawdbot.json config:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "ernie/ernie-5.0-thinking-preview"
      },
      "models": {
        "ernie/ernie-5.0-thinking-preview": {
          "alias": "ernie-5.0"
        }
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "ernie": {
        "baseUrl": "https://qianfan.baidubce.com/v2",
        "apiKey": "${ERNIE_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "ernie-5.0-thinking-preview",
            "name": "ERNIE 5.0",
            "contextWindow": 128000,
            "maxTokens": 65536
          }
        ]
      }
    }
  }
}

Step 3: Restart Clawdbot

clawdbot gateway restart

Step 4: Verify integration

clawdbot models list

You should see ERNIE models in the list.

Step 5: Use the model

Set as default:

clawdbot models set ernie/ernie-5.0-thinking-preview

Or use model alias in chat:

/model ernie-5.0

Model Parameters

ERNIE 5.0 Specifications

Parameter Value
Model ID ernie-5.0-thinking-preview
Context Window 128K tokens
Max Input 119K tokens
Max Output 1 - 65536 tokens
RPM (Rate Per Minute) 60
TPM (Tokens Per Minute) 150,000

Supported Request Parameters

Parameter Type Description
model string Model ID (required)
messages array Chat context messages (required)
stream boolean Enable streaming response
temperature number Output randomness (model-specific range)
top_p number Nucleus sampling parameter
max_tokens integer Maximum output tokens
stop array Stop sequences (up to 4 elements)
frequency_penalty number Frequency-based repetition penalty
presence_penalty number Presence-based repetition penalty

Thinking Mode Parameters

ERNIE 5.0 supports deep thinking mode:

Parameter Type Description
enable_thinking boolean Enable thinking mode
thinking_budget integer Max thinking chain tokens (default: 16384)
thinking_strategy string short_think or chain_of_draft
reasoning_effort string low, medium (default), or high

Troubleshooting

Model not appearing in list

Check config syntax:

clawdbot gateway config.get | grep -A 20 ernie

Verify API key is set:

echo $ERNIE_API_KEY

Authentication errors

  • Verify API key format is bce-v3/ALTAK-...
  • Check key is valid on Qianfan console
  • Ensure correct base URL: https://qianfan.baidubce.com/v2

Connection issues

Test API endpoint directly:

curl -X POST "https://qianfan.baidubce.com/v2/chat/completions" \
  -H "Authorization: Bearer $ERNIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ernie-5.0-thinking-preview", "messages": [{"role": "user", "content": "test"}]}'

Rate limit errors

ERNIE 5.0 has the following rate limits:

  • RPM: 60 requests per minute
  • TPM: 150,000 tokens per minute

If you hit rate limits, reduce request frequency or apply for higher quotas on Qianfan console.

Model Recommendations

  • ERNIE 5.0 (ernie/ernie-5.0-thinking-preview) - Best for complex reasoning tasks, deep analysis, and tasks requiring extensive thinking

References

Usage Guidance
This is an instruction-only integration guide that appears legitimate for adding Baidu ERNIE to Clawdbot, but note a metadata mismatch: the SKILL.md tells you to create and export ERNIE_API_KEY, while the skill's registry metadata lists no required environment variables. Before installing or following automated install steps: (1) treat ERNIE_API_KEY as a sensitive secret—do not commit it to version control and prefer a secrets manager over plain ~/.bashrc when possible; (2) verify the baseUrl (https://qianfan.baidubce.com/v2) and the official Baidu docs/console links yourself; (3) confirm how Clawdbot stores the apiKey in clawdbot.json so it isn't logged or exposed; (4) ask the skill author or registry maintainer to update the skill metadata to declare ERNIE_API_KEY as a required credential so automated reviewers and users see the dependency; and (5) rotate the key if you test it in shared/suspect environments. This looks like sloppy metadata rather than malicious behavior, but the omission reduces transparency—proceed carefully.
Capability Analysis
Type: OpenClaw Skill Name: ernie-integration Version: 1.0.4 The skill bundle is a legitimate integration guide for Baidu ERNIE 5.0 (Qianfan) models. It contains standard documentation, configuration examples for 'clawdbot.json', and transparent 'curl' commands for API testing using official Baidu endpoints (qianfan.baidubce.com). No malicious code, data exfiltration, or harmful prompt injection attempts were identified in SKILL.md, README.md, or the configuration examples.
Capability Assessment
Purpose & Capability
The skill's name/description (ERNIE integration) matches the runtime instructions (how to add ERNIE, editing clawdbot.json, example requests). However the declared metadata lists no required environment variables or primary credential while the instructions explicitly require ERNIE_API_KEY (Baidu BCE API key). That discrepancy is incoherent and may mislead automated checks or users.
Instruction Scope
SKILL.md stays within the stated purpose: it explains how to obtain a Baidu Qianfan API key, set ERNIE_API_KEY in shell rc, add provider config to clawdbot.json, restart the gateway, and test the endpoint. It only references config files and shell environment variables directly relevant to integration and does not request unrelated system files or other credentials.
Install Mechanism
There is no install specification and no code is written to disk by the skill itself (instruction-only). This is the lowest-risk install mechanism; nothing is downloaded or executed by the skill package.
Credentials
The instructions require a Baidu Qianfan API key (ERNIE_API_KEY) which is an appropriate and necessary secret for the stated purpose. However the skill metadata does not declare this required environment variable or a primary credential. That omission reduces transparency and could cause automation or reviewers to miss that a secret will be used. The number and scope of environment variables in the instructions are otherwise proportional (only the single service API key).
Persistence & Privilege
The skill does not request always:true and does not claim any special persistent privileges. It does not modify other skills' configurations and only instructs users to update their own clawdbot.json and shell rc files (normal for integration guides).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ernie-integration
  3. After installation, invoke the skill by name or use /ernie-integration
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.4
- Updated security note in the environment variable section to clarify API key handling: never commit API keys to version control and rotate keys regularly. - No other changes detected.
v1.0.3
- Improved security guidance: clarified that API keys should never be committed to version control and should be rotated regularly. - No functional changes to usage or integration steps.
v1.0.2
- Added a security note advising against storing API keys in plaintext config files and recommending environment variables and regular key rotation. - Clarified instruction to add the environment variable in `.bashrc` or `.zshrc` for persistence. - No other major changes to integration steps or configuration.
v1.0.1
- Removed the local settings file: .claude/settings.local.json. - No changes to user-facing documentation or integration steps. - This update improves repository cleanliness by removing unnecessary local configuration.
v1.0.0
ERNIE integration guide for Clawdbot—initial release: - Provides a detailed, step-by-step guide to integrating Baidu ERNIE 5.0 models via Qianfan API into Clawdbot. - Includes instructions for obtaining and configuring the required API key. - Documents sample configuration, environment setup, and troubleshooting steps. - Lists model parameters, usage examples, rate limits, and integration verification steps.
Metadata
Slug ernie-integration
Version 1.0.4
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 5
Frequently Asked Questions

What is ernie-integration?

Step-by-step guide for integrating Baidu ERNIE 5.0 (Qianfan) models into Clawdbot. Use when someone asks how to add ERNIE models, configure Baidu Qianfan, or... It is an AI Agent Skill for Claude Code / OpenClaw, with 287 downloads so far.

How do I install ernie-integration?

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

Is ernie-integration free?

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

Which platforms does ernie-integration support?

ernie-integration is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ernie-integration?

It is built and maintained by Mattheliu (@mattheliu); the current version is v1.0.4.

💬 Comments