fix(providers): openai live-test config isolation and qianfan default refresh (#113999)

* fix(providers): stop reading operator's real config in openai live tests

* fix(qianfan): refresh onboarding default off deprecated deepseek-v3.2

* fix(providers): satisfy live-test config type
This commit is contained in:
Peter Steinberger
2026-07-25 20:35:28 -07:00
committed by GitHub
parent 852a686a1b
commit 8eb841da79
3 changed files with 10 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ Qianfan is Baidu's MaaS platform: a unified, OpenAI-compatible API that routes r
| Auth | `QIANFAN_API_KEY` |
| API | OpenAI-compatible (`openai-completions`) |
| Base URL | `https://qianfan.baidubce.com/v2` |
| Default model | `qianfan/deepseek-v3.2` |
| Default model | `qianfan/deepseek-v4-pro` |
## Install plugin
@@ -41,7 +41,7 @@ openclaw gateway restart
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`
`QIANFAN` alias for the default model, and sets `qianfan/deepseek-v4-pro`
as the default model when none is configured.
</Step>

View File

@@ -12,7 +12,6 @@ import {
requireRegisteredProvider,
} from "openclaw/plugin-sdk/plugin-test-runtime";
import { runRealtimeSttLiveTest } from "openclaw/plugin-sdk/provider-test-contracts";
import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
import {
isOverloadedErrorMessage,
isServerErrorMessage,
@@ -97,22 +96,23 @@ function resolveLiveOpenAISkipReason(error: unknown): string | null {
return null;
}
/**
* Builds a synthetic config carrying only the live OpenAI credential this suite needs.
* Deliberately does not read the operator's real ~/.openclaw config: strict schema
* validation on that real, possibly-unmigrated file must never gate live provider tests.
*/
function createLiveConfig(): OpenClawConfig {
const cfg = getRuntimeConfig();
return {
...cfg,
models: {
...cfg.models,
providers: {
...cfg.models?.providers,
openai: {
...cfg.models?.providers?.openai,
apiKey: OPENAI_API_KEY,
baseUrl: "https://api.openai.com/v1",
models: [],
},
},
},
} as OpenClawConfig;
};
}
function createLiveTtsConfig(): ResolvedTtsConfig {

View File

@@ -4,7 +4,7 @@ import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-sha
import manifest from "./openclaw.plugin.json" with { type: "json" };
export const QIANFAN_BASE_URL = "https://qianfan.baidubce.com/v2";
export const QIANFAN_DEFAULT_MODEL_ID = "deepseek-v3.2";
export const QIANFAN_DEFAULT_MODEL_ID = "deepseek-v4-pro";
export function buildQianfanProvider(): ModelProviderConfig {
return buildManifestModelProviderConfig({