site: Sidrune AI has a China and a Global site, picked by where the user is
Sidrune reported (10-29) that it runs two sites whose keys don't cross:
China at sidrune.ai and Global at global.sidrune.ai, and its website
sends a browser to one by language. magpie listed the China site only,
so a user abroad who signed up on Global and pasted that key got 401
Invalid API key. They asked for a Global / China choice that moves the
endpoints and the key link with it.
Sidrune's entry is now two regions instead of top-level endpoints:
China (cn: sidrune.ai/v1, sidrune.ai) and Global (global:
global.sidrune.ai/v1, global.sidrune.ai), each with its own key link
(register?promo=MAGPIE3 on its site) and website. With regions named
China and Global, the app's existing paths take over (ef155a5ca): the
editor shows a picker, Get a key and the site link follow the region, a
new provider starts at China's in mainland China and Global's elsewhere,
and the two keep separate accounts (SplitAccounts).
Providers added before keep their endpoints: a provider stores its own,
and its region is read from them, so existing users stay on China.
Checked: global.sidrune.ai/v1/models and /v1/messages answer
API_KEY_REQUIRED without a key, as sidrune.ai does;
global.sidrune.ai/register?promo=MAGPIE3 answers 200;
global.sidrune.ai/ redirects to sidrune.ai/, their landing page.
Run on mote: node --test site/*.test.mjs, 45 of 45 pass. go test
./internal/provider -run TestPartner, all pass. A throwaway test fed
worker.js served() over this partners.js to the app and found Sidrune
valid, a new provider at sidrune.ai in China and when the zone is
unknown and at global.sidrune.ai abroad (key and site /go links with
/cn and /global), SplitAccounts set, and a provider at sidrune.ai
still at China after the user moves abroad.
Not tried: a request with a key on either site, and the editor's
picker for Sidrune in the GUI.
This commit is contained in:
+4
-3
@@ -115,9 +115,10 @@ export const PARTNERS = [
|
||||
{
|
||||
id: "sidrune",
|
||||
name: "Sidrune AI",
|
||||
chat: "https://sidrune.ai/v1",
|
||||
responses: "https://sidrune.ai/v1",
|
||||
anthropic: "https://sidrune.ai",
|
||||
regions: [
|
||||
{ id: "cn", name: "China", chat: "https://sidrune.ai/v1", responses: "https://sidrune.ai/v1", anthropic: "https://sidrune.ai", keysUrl: "https://sidrune.ai/register?promo=MAGPIE3", website: "https://sidrune.ai/" },
|
||||
{ id: "global", name: "Global", chat: "https://global.sidrune.ai/v1", responses: "https://global.sidrune.ai/v1", anthropic: "https://global.sidrune.ai", keysUrl: "https://global.sidrune.ai/register?promo=MAGPIE3", website: "https://global.sidrune.ai/" },
|
||||
],
|
||||
keysUrl: "https://sidrune.ai/register?promo=MAGPIE3",
|
||||
website: "https://sidrune.ai/",
|
||||
iconUrl: "https://usemagpie.ai/img/partner-sidrune.png",
|
||||
|
||||
Reference in New Issue
Block a user