Qianfan Provider
기준일: 2026-07-26
난이도: 중급
공식 기준: Qianfan
개요
이 페이지는 OpenClaw Qianfan provider의 인증, 모델 ref, 온보딩 플래그, 설정 키를 공식 문서 기준으로 정리합니다.
공식 요약: Use Qianfan's unified API to access many models in OpenClaw
model ref는 보통 provider/model 형식입니다. API key·endpoint·model id는 아래 원문 값을 그대로 쓰세요. 임의로 키나 엔드포인트를 만들지 마세요.
빠른 참조
| Property | Value |
|---|---|
| Provider | qianfan |
| Auth | QIANFAN_API_KEY |
| API | OpenAI-compatible (openai-completions) |
| Base URL | https://qianfan.baidubce.com/v2 |
| Default model | qianfan/deepseek-v3.2 |
공식 문서 기반 상세
아래는 공식 providers/qianfan 문서를 Mintlify 컴포넌트만 정리하고 공통 제목을 한국어로 맞춘 내용입니다. 설정 키, env, model ref, CLI 플래그는 원문 그대로 유지합니다.
Qianfan is Baidu's MaaS platform: a unified, OpenAI-compatible API that routes requests to many models behind a single endpoint and API key. OpenClaw ships it as the official external plugin @openclaw/qianfan-provider.
| Property | Value |
|---|---|
| Provider | qianfan |
| Auth | QIANFAN_API_KEY |
| API | OpenAI-compatible (openai-completions) |
| Base URL | https://qianfan.baidubce.com/v2 |
| Default model | qianfan/deepseek-v3.2 |
Install plugin
Install the official plugin, then restart Gateway:
openclaw plugins install @openclaw/qianfan-provider
openclaw gateway restart
시작하기
Create a Baidu Cloud account
Sign up or log in at the [Qianfan Console](https://console.bce.baidu.com/qianfan/ais/console/apiKey) and ensure you have Qianfan API access enabled.
Generate an API key
Create a new application or select an existing one, then generate an API key. Baidu Cloud keys use the `bce-v3/ALTAK-...` format.
Run onboarding
```bash
openclaw onboard --auth-choice qianfan-api-key
```
Non-interactive runs read the key from `--qianfan-api-key <key>` or
`QIANFAN_API_KEY`. Onboarding writes the provider config, adds the
`QIANFAN` alias for the default model, and sets `qianfan/deepseek-v3.2`
as the default model when none is configured.
Verify the model is available
```bash
openclaw models list --provider qianfan
```
Built-in catalog
| Model ref | Input | Context | Max output | Reasoning | Notes |
|---|---|---|---|---|---|
qianfan/deepseek-v3.2 |
text | 98,304 | 32,768 | Yes | Default model |
qianfan/ernie-5.0-thinking-preview |
text, image | 119,000 | 64,000 | Yes | Multimodal |
The catalog is static; there is no live model discovery.
You only need to override
models.providers.qianfanwhen you need a custom base URL or model metadata.
설정 예시
{
env: { QIANFAN_API_KEY: "bce-v3/ALTAK-..." },
agents: {
defaults: {
model: { primary: "qianfan/deepseek-v3.2" },
models: {
"qianfan/deepseek-v3.2": { alias: "QIANFAN" },
},
},
},
models: {
providers: {
qianfan: {
baseUrl: "https://qianfan.baidubce.com/v2",
api: "openai-completions",
models: [
{
id: "deepseek-v3.2",
name: "DEEPSEEK V3.2",
reasoning: true,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 98304,
maxTokens: 32768,
},
{
id: "ernie-5.0-thinking-preview",
name: "ERNIE-5.0-Thinking-Preview",
reasoning: true,
input: ["text", "image"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 119000,
maxTokens: 64000,
},
],
},
},
},
}
Model refs use the
qianfan/prefix (for exampleqianfan/deepseek-v3.2).
Transport and compatibility
Qianfan runs through the OpenAI-compatible transport path, not native OpenAI request shaping. Standard OpenAI SDK features work, but provider-specific parameters may not be forwarded.
문제 해결
- Ensure your API key starts with `bce-v3/ALTAK-` and has Qianfan API access enabled in the Baidu Cloud console.
- If models are not listed, confirm your account has the Qianfan service activated.
- Only change the base URL if you use a custom endpoint or proxy.
관련 문서
Choosing providers, model refs, and failover behavior.
Full OpenClaw configuration reference.
Configuring agent defaults and model assignments.
Official Qianfan API documentation.
검증 체크리스트
-
openclaw models list --provider qianfan로 모델이 보이는지 확인 - 기본 model alias를
agents.defaults.model.primary에 설정했는지 확인 - API key / OAuth / 로컬 런타임 인증 경로를 공식 문서와 대조했는지 확인
- failover 시 데이터가 다른 provider로 이동할 수 있는지 검토