Skip to content

Commit 4913db7

Browse files
authored
Merge pull request #6 from gitcommit90/fix/oauth-model-high-labels
Fix ChatGPT Sol model effort label
2 parents 62607ef + 58dca24 commit 4913db7

6 files changed

Lines changed: 87 additions & 12 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ReRouted is an independent project and is not affiliated with or endorsed by any
9898

9999
### 1. Install
100100

101-
[Download ReRouted 0.4.3 for Apple Silicon](https://github.com/gitcommit90/rerouted/releases/download/v0.4.3/ReRouted-0.4.3-arm64.dmg), open the DMG, and drag ReRouted to Applications.
101+
[Download ReRouted 0.4.4 for Apple Silicon](https://github.com/gitcommit90/rerouted/releases/download/v0.4.4/ReRouted-0.4.4-arm64.dmg), open the DMG, and drag ReRouted to Applications.
102102

103103
ReRouted requires Apple Silicon and macOS 12 Monterey or newer.
104104

@@ -204,7 +204,7 @@ The implementation is intentionally small: Electron, Node's built-in HTTP server
204204

205205
## Current release
206206

207-
ReRouted `0.4.3` fixes compact usage metrics so billion and trillion totals display with `B` and `T` units instead of continuing to grow in millions. It includes the hardened OAuth callbacks and renderer lock boundaries, uncapped SQLite usage history, 60-second quota refreshes while the Quota page is open, masked account identities, and image inputs introduced in `0.4.2`. Public builds are Developer ID signed, notarized, stapled, and distributed through stable GitHub Releases with in-app updates. The public API is intentionally limited to health, model discovery, and chat completions; a published third-party client compatibility matrix is still forthcoming.
207+
ReRouted `0.4.4` removes the preselected High effort suffix from the ChatGPT OAuth Sol model. Sol now appears as `gpt-5.6-sol`, matching Terra and Luna, while reasoning effort remains controlled by each calling client. Existing accounts, routes, and temporary model locks migrate automatically from the old ID. Public builds are Developer ID signed, notarized, stapled, and distributed through stable GitHub Releases with in-app updates. The public API is intentionally limited to health, model discovery, and chat completions; a published third-party client compatibility matrix is still forthcoming.
208208

209209
ReRouted is an independent personal project.
210210

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rerouted",
3-
"version": "0.4.3",
3+
"version": "0.4.4",
44
"description": "A macOS menu-bar router for accounts, models, and automatic fallback.",
55
"author": "gitcommit90",
66
"homepage": "https://rerouted.dev",

src/lib/constants.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const OAUTH = {
4949
},
5050
chatUrl: "https://chatgpt.com/backend-api/codex/responses",
5151
models: [
52-
{ id: "gpt-5.6-sol-high", name: "GPT 5.6 Sol (High)" },
52+
{ id: "gpt-5.6-sol", name: "GPT 5.6 Sol" },
5353
{ id: "gpt-5.6-terra", name: "GPT 5.6 Terra" },
5454
{ id: "gpt-5.6-luna", name: "GPT 5.6 Luna" },
5555
{ id: "gpt-5.5", name: "GPT 5.5" },
@@ -134,7 +134,7 @@ const OAUTH = {
134134
// Catalog entries removed during config normalization. Only known defaults are
135135
// removed so user-added model IDs remain intact.
136136
const RETIRED_OAUTH_MODELS = {
137-
chatgpt: ["gpt-5.3-codex"],
137+
chatgpt: ["gpt-5.3-codex", "gpt-5.6-sol-high"],
138138
claude: [
139139
"claude-opus-4-6",
140140
"claude-sonnet-4-6",
@@ -145,6 +145,11 @@ const RETIRED_OAUTH_MODELS = {
145145
xai: ["grok-4", "grok-code-fast-1", "grok-3"],
146146
};
147147

148+
// Keep persisted configurations and routes compatible with the old catalog ID.
149+
const OAUTH_MODEL_RENAMES = {
150+
chatgpt: { "gpt-5.6-sol-high": "gpt-5.6-sol" },
151+
};
152+
148153
const ONBOARDING_STEPS = [
149154
"permissions",
150155
"admin-password",
@@ -164,5 +169,6 @@ module.exports = {
164169
KEYED_PRESETS,
165170
OAUTH,
166171
RETIRED_OAUTH_MODELS,
172+
OAUTH_MODEL_RENAMES,
167173
ONBOARDING_STEPS,
168174
};

src/lib/store.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
const fs = require("node:fs");
44
const path = require("node:path");
55
const { generateApiKey, generateId } = require("./password");
6-
const { DEFAULT_PORT, OAUTH, RETIRED_OAUTH_MODELS } = require("./constants");
6+
const {
7+
DEFAULT_PORT,
8+
OAUTH,
9+
RETIRED_OAUTH_MODELS,
10+
OAUTH_MODEL_RENAMES,
11+
} = require("./constants");
712
const { ensureUniqueComboNames, providerRouteIds } = require("./combos");
813
const { backfillTokenIdentity } = require("./oauth-identity");
914

@@ -105,7 +110,23 @@ function mergeOAuthCatalog(provider) {
105110
if (!isOAuthProvider(provider)) return;
106111
const family = canonicalProviderType(provider.type);
107112
const catalog = OAUTH[family]?.models || [];
108-
const existing = new Map((provider.models || []).map((model) => [model.id, model]));
113+
const renames = OAUTH_MODEL_RENAMES[family] || {};
114+
const existing = new Map();
115+
for (const model of provider.models || []) {
116+
const renamedId = renames[model.id] || model.id;
117+
const current = existing.get(renamedId);
118+
existing.set(renamedId, {
119+
...(current || {}),
120+
...model,
121+
id: renamedId,
122+
});
123+
}
124+
for (const [from, to] of Object.entries(renames)) {
125+
if (provider.modelLocks?.[from] && !provider.modelLocks[to]) {
126+
provider.modelLocks[to] = provider.modelLocks[from];
127+
}
128+
delete provider.modelLocks?.[from];
129+
}
109130
const catalogIds = new Set(catalog.map((model) => model.id));
110131
const retiredIds = new Set(RETIRED_OAUTH_MODELS[family] || []);
111132
provider.models = [
@@ -202,6 +223,15 @@ function migrate(cfg) {
202223
ensureOAuthAliases(cfg.providers, cfg.providerAliasCounters);
203224

204225
if (!Array.isArray(cfg.combos)) cfg.combos = [];
226+
const providerById = new Map((cfg.providers || []).map((provider) => [provider.id, provider]));
227+
for (const combo of cfg.combos) {
228+
for (const member of combo.members || []) {
229+
const provider = providerById.get(member.providerId);
230+
const family = canonicalProviderType(provider?.type);
231+
const rename = OAUTH_MODEL_RENAMES[family]?.[member.model];
232+
if (rename) member.model = rename;
233+
}
234+
}
205235
if (needsComboNameMigration) {
206236
ensureUniqueComboNames(cfg.combos, providerRouteIds(cfg.providers));
207237
}

tests/gateway.test.js

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,14 +766,15 @@ describe("format translation", () => {
766766
it("Codex Responses receives reasoning.effort from OpenAI and Responses clients", () => {
767767
const fromOpenAi = chatgpt.toResponsesBody(
768768
{ messages: [{ role: "user", content: "hi" }], reasoning_effort: "high" },
769-
"gpt-5.5",
769+
"gpt-5.6-sol",
770770
true
771771
);
772772
const fromResponses = chatgpt.toResponsesBody(
773773
{ messages: [{ role: "user", content: "hi" }], reasoning: { effort: "xhigh" } },
774774
"gpt-5.5",
775775
true
776776
);
777+
assert.equal(fromOpenAi.model, "gpt-5.6-sol");
777778
assert.deepEqual(fromOpenAi.reasoning, { effort: "high", summary: "auto" });
778779
assert.deepEqual(fromResponses.reasoning, { effort: "xhigh", summary: "auto" });
779780
});
@@ -963,7 +964,18 @@ describe("requested OAuth model catalogs", () => {
963964
it("ships the requested ChatGPT, Claude, Antigravity, and Grok models", () => {
964965
assert.deepEqual(
965966
OAUTH.chatgpt.models.map((model) => model.id),
966-
["gpt-5.6-sol-high", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4-mini", "gpt-5.4"]
967+
[
968+
"gpt-5.6-sol",
969+
"gpt-5.6-terra",
970+
"gpt-5.6-luna",
971+
"gpt-5.5",
972+
"gpt-5.4-mini",
973+
"gpt-5.4",
974+
]
975+
);
976+
assert.deepEqual(
977+
OAUTH.chatgpt.models.slice(0, 3).map((model) => model.name),
978+
["GPT 5.6 Sol", "GPT 5.6 Terra", "GPT 5.6 Luna"]
967979
);
968980
assert.deepEqual(
969981
OAUTH.claude.models.map((model) => model.id),
@@ -992,9 +1004,36 @@ describe("requested OAuth model catalogs", () => {
9921004
combos: [],
9931005
});
9941006
const models = cfg.providers[0].models;
995-
assert.ok(models.some((model) => model.id === "gpt-5.6-sol-high" && model.enabled));
1007+
assert.ok(models.some((model) => model.id === "gpt-5.6-sol" && model.enabled));
9961008
assert.equal(models.find((model) => model.id === "gpt-5.4").enabled, false);
9971009
});
1010+
1011+
it("renames the old Sol high catalog ID in providers and routes", () => {
1012+
const { migrate } = require("../src/lib/store");
1013+
const cfg = migrate({
1014+
providers: [
1015+
{
1016+
id: "prov_chatgpt",
1017+
type: "chatgpt",
1018+
models: [{ id: "gpt-5.6-sol-high", name: "GPT 5.6 Sol (High)", enabled: false }],
1019+
modelLocks: { "gpt-5.6-sol-high": { until: Date.now() + 60_000 } },
1020+
},
1021+
],
1022+
combos: [
1023+
{
1024+
id: "coding",
1025+
name: "coding",
1026+
strategy: "fallback",
1027+
members: [{ providerId: "prov_chatgpt", model: "gpt-5.6-sol-high" }],
1028+
},
1029+
],
1030+
});
1031+
const provider = cfg.providers[0];
1032+
assert.equal(provider.models.find((model) => model.id === "gpt-5.6-sol").enabled, false);
1033+
assert.equal(provider.models.some((model) => model.id === "gpt-5.6-sol-high"), false);
1034+
assert.ok(provider.modelLocks["gpt-5.6-sol"]);
1035+
assert.equal(cfg.combos[0].members[0].model, "gpt-5.6-sol");
1036+
});
9981037
});
9991038

10001039
describe("pkce", () => {

0 commit comments

Comments
 (0)