@kenkaiiii/gg-ai 5.54.1 → 5.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -268,7 +268,7 @@ function finaliseBySource(source, message, requestId, hint) {
|
|
|
268
268
|
headline: "GG Coder hit an unexpected error.",
|
|
269
269
|
source,
|
|
270
270
|
message,
|
|
271
|
-
guidance: hint ?? "This looks like a GG Coder bug \u2014 please report it to the developer
|
|
271
|
+
guidance: hint ?? "This looks like a GG Coder bug \u2014 please report it to the developer.",
|
|
272
272
|
...requestId ? { requestId } : {}
|
|
273
273
|
};
|
|
274
274
|
}
|
|
@@ -302,6 +302,9 @@ function providerGuidance(provider, message, statusCode) {
|
|
|
302
302
|
if (statusCode === 401 || lower.includes("unauthorized") || lower.includes("invalid api key")) {
|
|
303
303
|
return `Authentication failed with ${name}. Re-authenticate to refresh your credentials.`;
|
|
304
304
|
}
|
|
305
|
+
if (lower.includes("requires a newer version")) {
|
|
306
|
+
return `${name} needs a newer GG Coder to serve this model. Update GG Coder to the latest version and retry, or switch to another ${name} model via the model selector.`;
|
|
307
|
+
}
|
|
305
308
|
if (lower.includes("overloaded") || lower.includes("engine_overloaded")) {
|
|
306
309
|
return `${name}'s servers are overloaded right now. Retry in a moment \u2014 not a GG Coder issue.`;
|
|
307
310
|
}
|
|
@@ -2447,7 +2450,7 @@ function extractRequestIdFromMessage(message) {
|
|
|
2447
2450
|
|
|
2448
2451
|
// src/providers/openai-codex.ts
|
|
2449
2452
|
var DEFAULT_BASE_URL = "https://chatgpt.com/backend-api";
|
|
2450
|
-
var CODEX_CLIENT_VERSION = "0.
|
|
2453
|
+
var CODEX_CLIENT_VERSION = "0.153.4";
|
|
2451
2454
|
var CODEX_REQUEST_COMPRESSION_MIN_BYTES = 16 * 1024;
|
|
2452
2455
|
var zstdInitPromise;
|
|
2453
2456
|
async function encodeCodexRequest(body) {
|
|
@@ -2544,8 +2547,10 @@ async function* runStream3(options) {
|
|
|
2544
2547
|
body.temperature = options.temperature;
|
|
2545
2548
|
}
|
|
2546
2549
|
body.reasoning = {
|
|
2550
|
+
// GPT-5.6/6 require at least low; older models still support thinking off.
|
|
2551
|
+
// Apply the floor here for every caller, including one-off prompt rewrites.
|
|
2547
2552
|
// `ultra` is a client orchestration preset, not a Codex API effort.
|
|
2548
|
-
effort: options.thinking === "ultra" ? "max" : options.thinking ?? "none",
|
|
2553
|
+
effort: options.thinking === "ultra" ? "max" : options.thinking ?? (responsesLite ? "low" : "none"),
|
|
2549
2554
|
summary: "auto",
|
|
2550
2555
|
...responsesLite ? { context: "all_turns" } : {}
|
|
2551
2556
|
};
|
|
@@ -2590,14 +2595,10 @@ async function* runStream3(options) {
|
|
|
2590
2595
|
const usageLimit = codexUsageLimitError(parsed.errorObj, response.status, requestId);
|
|
2591
2596
|
if (usageLimit) throw usageLimit;
|
|
2592
2597
|
let hint;
|
|
2593
|
-
if (response.status === 400 &&
|
|
2594
|
-
|
|
2595
|
-
hint = "Use gpt-5.5 instead. OpenAI's Codex model catalog does not list gpt-5.5-pro.";
|
|
2596
|
-
} else {
|
|
2597
|
-
hint = "This model is not available through Codex for the authenticated account. Switch to a model listed for OpenAI Codex via the model selector, or check your Codex usage limits.";
|
|
2598
|
-
}
|
|
2598
|
+
if (response.status === 400 && message === `The '${options.model}' model is not supported when using Codex with a ChatGPT account.`) {
|
|
2599
|
+
hint = "This model is not available through your ChatGPT account. Switch to a model listed for OpenAI via the model selector, or check your ChatGPT usage limits.";
|
|
2599
2600
|
} else if (response.status === 404 && text.includes("does not exist")) {
|
|
2600
|
-
hint = "This model is not in
|
|
2601
|
+
hint = "This model is not in OpenAI's current catalog for your ChatGPT account. Switch to GPT-6 Astra, GPT-5.6 Sol, GPT-5.6 Terra, or GPT-5.6 Luna via the model selector.";
|
|
2601
2602
|
}
|
|
2602
2603
|
throw new ProviderError("openai", message, {
|
|
2603
2604
|
statusCode: response.status,
|