From b8ec0aa2185158f45609abf993565ccc7d930b17 Mon Sep 17 00:00:00 2001 From: TrackCrewGalore Date: Wed, 22 Jul 2026 21:37:38 +0100 Subject: [PATCH] fix(providers): refresh Baidu ERNIE and Qianfan website URLs (#6271) (#8128) Point dashboard provider cards at current Baidu developer landings instead of the deprecated yiyan nag page and the 301ing wenxinworkshop path. Co-authored-by: LandLord64 Co-authored-by: Cursor --- .../fixes/6271-baidu-qianfan-website-urls.md | 1 + .../constants/providers/apikey/regional.ts | 4 +-- .../baidu-qianfan-website-urls-6271.test.ts | 31 +++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 changelog.d/fixes/6271-baidu-qianfan-website-urls.md create mode 100644 tests/unit/baidu-qianfan-website-urls-6271.test.ts diff --git a/changelog.d/fixes/6271-baidu-qianfan-website-urls.md b/changelog.d/fixes/6271-baidu-qianfan-website-urls.md new file mode 100644 index 0000000000..7102cbd75b --- /dev/null +++ b/changelog.d/fixes/6271-baidu-qianfan-website-urls.md @@ -0,0 +1 @@ +- **fix(providers):** refresh Baidu ERNIE + Qianfan provider website URLs to current developer landing pages ([#6271](https://github.com/diegosouzapw/OmniRoute/issues/6271)) — thanks @TrackCrewGalore diff --git a/src/shared/constants/providers/apikey/regional.ts b/src/shared/constants/providers/apikey/regional.ts index 5422766c35..eafc4abf2c 100644 --- a/src/shared/constants/providers/apikey/regional.ts +++ b/src/shared/constants/providers/apikey/regional.ts @@ -10,7 +10,7 @@ export const APIKEY_PROVIDERS_REGIONAL = { icon: "cloud", color: "#2468F2", textIcon: "BD", - website: "https://cloud.baidu.com/product/wenxinworkshop", + website: "https://cloud.baidu.com/product-s/qianfan_home", apiHint: "Use a Qianfan API key from Baidu AI Cloud. The default endpoint is OpenAI-compatible v2.", }, @@ -224,7 +224,7 @@ export const APIKEY_PROVIDERS_REGIONAL = { icon: "auto_awesome", color: "#2932E1", textIcon: "BD", - website: "https://yiyan.baidu.com", + website: "https://ernie.baidu.com/", hasFree: true, freeNote: "Free ERNIE Speed/Lite models. China's #2 LLM.", passthroughModels: true, diff --git a/tests/unit/baidu-qianfan-website-urls-6271.test.ts b/tests/unit/baidu-qianfan-website-urls-6271.test.ts new file mode 100644 index 0000000000..422a08c144 --- /dev/null +++ b/tests/unit/baidu-qianfan-website-urls-6271.test.ts @@ -0,0 +1,31 @@ +import test from "node:test"; +import assert from "node:assert/strict"; + +// Regression guard for #6271 — Baidu / Qianfan dashboard website links must +// point at current developer/console entry points, not retired consumer URLs. +const { APIKEY_PROVIDERS_REGIONAL } = await import( + "../../src/shared/constants/providers/apikey/regional.ts" +); + +test("#6271 qianfan website is the current Qianfan product home (not wenxinworkshop)", () => { + const entry = (APIKEY_PROVIDERS_REGIONAL as Record).qianfan; + assert.ok(entry, "qianfan regional provider entry must exist"); + assert.equal(entry.website, "https://cloud.baidu.com/product-s/qianfan_home"); + assert.doesNotMatch( + entry.website ?? "", + /wenxinworkshop/, + "stale Wenxin Workshop path must not remain", + ); +}); + +test("#6271 baidu (ERNIE) website is ernie.baidu.com (not yiyan consumer nag)", () => { + const entry = (APIKEY_PROVIDERS_REGIONAL as Record).baidu; + assert.ok(entry, "baidu regional provider entry must exist"); + assert.equal(entry.website, "https://ernie.baidu.com/"); + assert.doesNotMatch(entry.website ?? "", /yiyan\.baidu\.com/, "deprecated yiyan URL must not remain"); +}); + +test("#6271 baidu authHint still points operators at the BCE console", () => { + const entry = (APIKEY_PROVIDERS_REGIONAL as Record).baidu; + assert.match(entry.authHint ?? "", /console\.bce\.baidu\.com/); +});