mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-14 13:43:17 +08:00
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared";
|
|
|
|
export const QIANFAN_BASE_URL = "https://qianfan.baidubce.com/v2";
|
|
export const QIANFAN_DEFAULT_MODEL_ID = "deepseek-v3.2";
|
|
const QIANFAN_DEFAULT_CONTEXT_WINDOW = 98304;
|
|
const QIANFAN_DEFAULT_MAX_TOKENS = 32768;
|
|
const QIANFAN_DEFAULT_COST = {
|
|
input: 0,
|
|
output: 0,
|
|
cacheRead: 0,
|
|
cacheWrite: 0,
|
|
};
|
|
|
|
export function buildQianfanProvider(): ModelProviderConfig {
|
|
return {
|
|
baseUrl: QIANFAN_BASE_URL,
|
|
api: "openai-completions",
|
|
models: [
|
|
{
|
|
id: QIANFAN_DEFAULT_MODEL_ID,
|
|
name: "DEEPSEEK V3.2",
|
|
reasoning: true,
|
|
input: ["text"],
|
|
cost: QIANFAN_DEFAULT_COST,
|
|
contextWindow: QIANFAN_DEFAULT_CONTEXT_WINDOW,
|
|
maxTokens: QIANFAN_DEFAULT_MAX_TOKENS,
|
|
},
|
|
{
|
|
id: "ernie-5.0-thinking-preview",
|
|
name: "ERNIE-5.0-Thinking-Preview",
|
|
reasoning: true,
|
|
input: ["text", "image"],
|
|
cost: QIANFAN_DEFAULT_COST,
|
|
contextWindow: 119000,
|
|
maxTokens: 64000,
|
|
},
|
|
],
|
|
};
|
|
}
|