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 <ulofeuduokhai@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
TrackCrewGalore
2026-07-22 21:37:38 +01:00
committed by GitHub
parent f1d38527ce
commit b8ec0aa218
3 changed files with 34 additions and 2 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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<string, { website?: string }>).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<string, { website?: string }>).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<string, { authHint?: string }>).baidu;
assert.match(entry.authHint ?? "", /console\.bce\.baidu\.com/);
});