mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 10:52:17 +03:00
feat(sse): restore GPT-6 Astra effort aliases and Codex 0.153.4 pin (#13026)
Three related things that genuinely belong together: the registry and suffix splitter not knowing Astra while the live catalog serves it, the Codex client pin Astra requires, and dropping `next/font/google` so a production image build does not reach fonts.googleapis.com. --- Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (#13035 + #13011) and the `chatHelpers.ts` import block (#12975 on the tip + #13017). - `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓ - complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline - 531 of 532 focused assertions green across the batch's 46 test files - `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on #13038), attributed per PR The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied. ⚠️ base-red inherited: #12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here). Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "@/shared/components/ThemeProvider";
|
||||
import { NextIntlClientProvider } from "next-intl";
|
||||
@@ -11,11 +10,6 @@ import { PwaRegister } from "@/shared/components/PwaRegister";
|
||||
import { LocaleAutoDetect } from "@/shared/components/LocaleAutoDetect";
|
||||
import { BasePathNetworkProvider } from "@/shared/components/BasePathNetworkProvider";
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-inter",
|
||||
});
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: "#0b0f1a",
|
||||
viewportFit: "cover",
|
||||
@@ -135,7 +129,7 @@ export default async function RootLayout({ children }) {
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<body className={`${inter.variable} font-sans antialiased`} suppressHydrationWarning>
|
||||
<body className="font-sans antialiased" suppressHydrationWarning>
|
||||
<a
|
||||
href="#main-content"
|
||||
className="sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:px-4 focus:py-2 focus:bg-[#6366f1] focus:text-white focus:rounded-lg focus:text-sm focus:font-semibold focus:shadow-lg"
|
||||
|
||||
@@ -101,6 +101,8 @@ export function getCodexFastCostMultiplier(
|
||||
|
||||
const modelKey = stripCodexEffortSuffix(normalizeModelName(String(model || "")).toLowerCase());
|
||||
const compactModelKey = modelKey.replace(/-/g, "");
|
||||
// Codex Astra Fast is 2.5x Standard (https://developers.openai.com/codex/pricing).
|
||||
if (modelKey === "gpt-6-astra" || compactModelKey === "gpt6astra") return 2.5;
|
||||
if (
|
||||
/^gpt-5\.6-(?:sol|terra|luna)$/.test(modelKey) ||
|
||||
/^gpt5\.6(?:sol|terra|luna)$/.test(compactModelKey)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// refresh this so the fingerprint OpenAI sees from the OAuth/Responses face
|
||||
// matches the real client version. Overridable per-deployment via
|
||||
// CODEX_CLIENT_VERSION.
|
||||
export const DEFAULT_CODEX_CLIENT_VERSION = "0.153.2";
|
||||
export const DEFAULT_CODEX_CLIENT_VERSION = "0.153.4";
|
||||
export const CODEX_CLI_RS_ORIGINATOR = "codex_cli_rs";
|
||||
|
||||
export function getCodexCliRsHeaders(
|
||||
|
||||
@@ -118,6 +118,12 @@ const GEMINI_36_FLASH_MODEL_SPEC = {
|
||||
} satisfies ModelSpec;
|
||||
|
||||
export const MODEL_SPECS: Record<string, ModelSpec> = {
|
||||
// Public model limits; the Codex registry supplies its smaller OAuth window.
|
||||
// https://developers.openai.com/api/docs/models/gpt-6-astra
|
||||
"gpt-6-astra": {
|
||||
...GPT_5_6_MODEL_SPEC,
|
||||
aliases: ["openai/gpt-6-astra"],
|
||||
},
|
||||
"gpt-5.6": {
|
||||
...GPT_5_6_MODEL_SPEC,
|
||||
aliases: ["openai/gpt-5.6"],
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Pure data; merged by default-pricing.ts via spread (god-file decomposition; semantic split).
|
||||
*/
|
||||
import {
|
||||
GPT_6_ASTRA_PRICING,
|
||||
GEMINI_3_7_FLASH_PROMO_PRICING,
|
||||
GPT_5_5_PRICING,
|
||||
GPT_5_6_LUNA_PRICING,
|
||||
@@ -20,6 +21,7 @@ import {
|
||||
|
||||
export const DEFAULT_PRICING_FRONTIER = {
|
||||
openai: {
|
||||
"gpt-6-astra": GPT_6_ASTRA_PRICING,
|
||||
"gpt-5.6": GPT_5_6_SOL_PRICING,
|
||||
"gpt-5.6-sol": GPT_5_6_SOL_PRICING,
|
||||
"gpt-5.6-terra": GPT_5_6_TERRA_PRICING,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Pure data; merged by default-pricing.ts via spread (god-file decomposition; semantic split).
|
||||
*/
|
||||
import {
|
||||
GPT_6_ASTRA_PRICING,
|
||||
CLAUDE_FABLE_5_1_PRICING,
|
||||
CLAUDE_OPUS_5_PRICING,
|
||||
GEMINI_3_7_FLASH_PROMO_PRICING,
|
||||
@@ -19,6 +20,10 @@ const ANTIGRAVITY_GEMINI_3_7_PRICING = {
|
||||
"gemini-3.7-flash-high": GEMINI_3_7_FLASH_PROMO_PRICING,
|
||||
};
|
||||
|
||||
// Codex Standard: 250 / 25 / 1250 credits per MTok, at 25 credits per USD.
|
||||
// https://developers.openai.com/codex/pricing
|
||||
const GPT_6_ASTRA_CODEX_PRICING = GPT_6_ASTRA_PRICING;
|
||||
|
||||
export const DEFAULT_PRICING_OAUTH = {
|
||||
cc: {
|
||||
"claude-fable-5-1": CLAUDE_FABLE_5_1_PRICING,
|
||||
@@ -88,6 +93,13 @@ export const DEFAULT_PRICING_OAUTH = {
|
||||
},
|
||||
},
|
||||
cx: {
|
||||
"gpt-6-astra": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"gpt-6-astra-ultra": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"gpt-6-astra-max": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"gpt-6-astra-xhigh": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"gpt-6-astra-high": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"gpt-6-astra-medium": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"gpt-6-astra-low": GPT_6_ASTRA_CODEX_PRICING,
|
||||
"codex-auto-review": GPT_5_5_PRICING,
|
||||
// Codex uses credits per 1M tokens. OmniRoute stores the dollar-equivalent
|
||||
// values below at the documented conversion of 25 credits per USD.
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
/**
|
||||
* Pricing data — shared per-MTok tier constants (god-file decomposition). Pure data; merged by the barrel.
|
||||
*/
|
||||
// OpenAI API Standard; Codex Standard has the same dollar-equivalent rates.
|
||||
// https://openai.com/index/gpt-6-astra/
|
||||
export const GPT_6_ASTRA_PRICING = {
|
||||
input: 10.0,
|
||||
output: 50.0,
|
||||
cached: 1.0,
|
||||
reasoning: 50.0,
|
||||
cache_creation: 12.5,
|
||||
};
|
||||
|
||||
export const GPT_5_3_CODEX_PRICING = {
|
||||
input: 5.0,
|
||||
output: 20.0,
|
||||
|
||||
Reference in New Issue
Block a user