mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 07:42:13 +03:00
This commit is contained in:
committed by
GitHub
parent
ccbfca84dd
commit
46e33e164d
@@ -30,6 +30,8 @@
|
||||
|
||||
### 🔧 Bug Fixes
|
||||
|
||||
- **dashboard (Quick Start step 1):** the Quick Start "Create API key" step told users to "Go to **Endpoint** → Registered Keys" and linked to `/dashboard/endpoint`, but API keys are created on the **API Manager** page (`/dashboard/api-manager`, sidebar "API Keys") — the Endpoint page has no "Registered Keys" section, so users followed the link and could not find where to create a key. Step 1 now reads "Go to **API Keys**" and links to `/dashboard/api-manager`. Regression guard: `tests/unit/ui/quick-start-api-keys-link-5695.test.ts`. ([#5695](https://github.com/diegosouzapw/OmniRoute/issues/5695))
|
||||
|
||||
- **providers (DashScope/Alibaba setup link):** the "Get API key" link for the **Alibaba** and **Alibaba (China)** providers pointed at the bare API host (`dashscope-intl.aliyuncs.com` / `dashscope.aliyuncs.com`), which returns **404** in a browser — API hostnames have no homepage. Repointed to the consoles where keys are actually issued: `bailian.console.alibabacloud.com` (international) and `dashscope.console.aliyun.com` (China). Same class as #5572/#5574/#5576; regression guard added to `tests/unit/provider-setup-links-5572.test.ts`. ([#5665](https://github.com/diegosouzapw/OmniRoute/issues/5665))
|
||||
|
||||
- **thinking / runtime-config (module-graph fix):** operator-configured proxy settings that are hydrated at **boot** but read **per-request** were silently ignored in production. Next.js compiles `instrumentation.ts` (boot hydration via `applyRuntimeSettings` / restore hooks) as a **separate webpack module graph** from the app-route / open-sse executors, so a module-local `let _config` singleton is **duplicated** — the boot copy is hydrated but the request path reads a different, un-hydrated copy. Live VPS validation proved the Thinking-Budget hydration ran to completion at boot yet `base.ts` still saw the `passthrough` default (this is why #5312 fix A stayed broken even after the boot-wiring fix). Fixed by backing the singletons with `globalThis` (the pattern `systemPrompt.ts` already uses for the Global System Prompt, #2470), so all module-graph copies share one instance: **`thinkingBudget.ts`** (the dashboard Thinking-Budget mode now reaches the executor), **`backgroundTaskDetector.ts`** (the opt-in background-model degradation now actually fires on requests), and **`systemTransforms.ts`** (operator pipeline overrides now reach the request path). `payloadRules.ts` was already safe (it lazily self-loads from the DB per request, #2986). Regression guards: `tests/unit/thinking-budget-globalthis-5312.test.ts` + `tests/unit/runtime-config-globalthis-5312.test.ts` (assert globalThis-backed sharing; a module-local `let` fails them). ([#5312](https://github.com/diegosouzapw/OmniRoute/issues/5312))
|
||||
|
||||
@@ -1109,7 +1109,7 @@ export default function HomePageClient({ machineId }: HomePageClientProps) {
|
||||
<p className="text-text-muted mt-0.5">
|
||||
{t.rich("step1Desc", {
|
||||
endpoint: (chunks) => (
|
||||
<Link href="/dashboard/endpoint" className="text-primary hover:underline">
|
||||
<Link href="/dashboard/api-manager" className="text-primary hover:underline">
|
||||
{chunks}
|
||||
</Link>
|
||||
),
|
||||
|
||||
@@ -1475,7 +1475,7 @@
|
||||
"quickStartDesc": "Get up and running in 4 steps. Connect providers, route models, monitor everything.",
|
||||
"fullDocs": "Full Docs",
|
||||
"step1Title": "1. Create API key",
|
||||
"step1Desc": "Go to <endpoint>Endpoint</endpoint> -> Registered Keys. Generate one key per environment.",
|
||||
"step1Desc": "Go to <endpoint>API Keys</endpoint>. Generate one key per environment.",
|
||||
"step2Title": "2. Connect providers",
|
||||
"step2Desc": "Add accounts in <providers>Providers</providers>. Supports OAuth, API Key, and free tiers.",
|
||||
"step3Title": "3. Point your client",
|
||||
|
||||
40
tests/unit/ui/quick-start-api-keys-link-5695.test.ts
Normal file
40
tests/unit/ui/quick-start-api-keys-link-5695.test.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { dirname, resolve } from "node:path";
|
||||
|
||||
// #5695 — the dashboard Quick Start step 1 told users to "Go to Endpoint ->
|
||||
// Registered Keys", linking to /dashboard/endpoint. But API keys are created on
|
||||
// the API Manager page (/dashboard/api-manager, sidebar label "API Keys"); the
|
||||
// Endpoint page has no "Registered Keys" section. Users followed the link and
|
||||
// could not find where to create a key. Step 1 must point at API Keys.
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const source = readFileSync(
|
||||
resolve(here, "../../../src/app/(dashboard)/dashboard/HomePageClient.tsx"),
|
||||
"utf8"
|
||||
);
|
||||
const messages = JSON.parse(
|
||||
readFileSync(resolve(here, "../../../src/i18n/messages/en.json"), "utf8")
|
||||
) as { home: { step1Desc: string } };
|
||||
|
||||
test("#5695 Quick Start step 1 links to the API Manager (API Keys), not Endpoint", () => {
|
||||
// The endpoint render-prop Link inside the step1Desc rich block.
|
||||
const hrefMatch = source.match(/t\.rich\("step1Desc"[\s\S]*?<Link href="([^"]*)"/);
|
||||
assert.ok(hrefMatch, "expected to find the step1Desc endpoint Link in HomePageClient.tsx");
|
||||
assert.equal(
|
||||
hrefMatch![1],
|
||||
"/dashboard/api-manager",
|
||||
"Quick Start step 1 must link to /dashboard/api-manager where API keys are created"
|
||||
);
|
||||
});
|
||||
|
||||
test("#5695 step1Desc copy points at API Keys, not the nonexistent Endpoint→Registered Keys", () => {
|
||||
const desc = messages.home.step1Desc;
|
||||
assert.ok(desc.includes("API Keys"), `step1Desc should mention "API Keys"; got: "${desc}"`);
|
||||
assert.ok(
|
||||
!desc.includes("Registered Keys"),
|
||||
`step1Desc must not send users to "Registered Keys" under Endpoint; got: "${desc}"`
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user