mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 09:11:13 +00:00
test: stabilize provider auth discovery cases
This commit is contained in:
@@ -179,7 +179,7 @@ const TEST_PROVIDER_ENV_TO_PROVIDER_IDS: Record<string, string[]> = {
|
||||
HF_TOKEN: ["huggingface"],
|
||||
HUGGINGFACE_HUB_TOKEN: ["huggingface"],
|
||||
KILOCODE_API_KEY: ["kilocode"],
|
||||
KIMI_API_KEY: ["moonshot"],
|
||||
KIMI_API_KEY: ["moonshot", "kimi"],
|
||||
KIMICODE_API_KEY: ["kimi-coding"],
|
||||
MINIMAX_API_KEY: ["minimax"],
|
||||
MINIMAX_OAUTH_TOKEN: ["minimax"],
|
||||
@@ -290,13 +290,6 @@ async function inferImplicitProviderTestPluginIds(params: {
|
||||
providerIds.add(pluginId);
|
||||
}
|
||||
}
|
||||
const legacyGrokApiKey = (
|
||||
params.config?.tools?.web?.search as { grok?: { apiKey?: unknown } } | undefined
|
||||
)?.grok?.apiKey;
|
||||
if (legacyGrokApiKey !== undefined && params.config?.plugins?.entries?.xai?.enabled !== false) {
|
||||
providerIds.add("xai");
|
||||
}
|
||||
|
||||
if (providerIds.size === 0) {
|
||||
// No config/env/auth hints: keep ambient local auto-discovery focused on the
|
||||
// one provider that is expected to probe localhost in tests.
|
||||
|
||||
@@ -81,7 +81,7 @@ describe("models-config provider auth provenance", () => {
|
||||
expect(providers?.together?.apiKey).toBe(NON_ENV_SECRETREF_MARKER);
|
||||
});
|
||||
|
||||
it("keeps oauth compatibility markers for minimax-portal", async () => {
|
||||
it("keeps oauth compatibility markers for minimax-portal", { timeout: 240_000 }, async () => {
|
||||
const agentDir = mkdtempSync(join(tmpdir(), "openclaw-test-"));
|
||||
await writeFile(
|
||||
join(agentDir, "auth-profiles.json"),
|
||||
|
||||
@@ -129,6 +129,8 @@ describe("chutes implicit provider auth mode", () => {
|
||||
const providers = await resolveImplicitProvidersForTest({
|
||||
agentDir,
|
||||
env: {
|
||||
VITEST: "true",
|
||||
NODE_ENV: "test",
|
||||
CHUTES_API_KEY: "env-chutes-api-key",
|
||||
} as NodeJS.ProcessEnv,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user