mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
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:
1
changelog.d/fixes/6271-baidu-qianfan-website-urls.md
Normal file
1
changelog.d/fixes/6271-baidu-qianfan-website-urls.md
Normal 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
|
||||
@@ -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,
|
||||
|
||||
31
tests/unit/baidu-qianfan-website-urls-6271.test.ts
Normal file
31
tests/unit/baidu-qianfan-website-urls-6271.test.ts
Normal 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/);
|
||||
});
|
||||
Reference in New Issue
Block a user