@kenkaiiii/gg-ai 5.103.0 → 5.105.0
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/README.md +1 -1
- package/dist/index.cjs +22 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -835,6 +835,8 @@ declare function formatErrorForDisplay(err: unknown): string;
|
|
|
835
835
|
type ChatErrorReason = "usage_limit" | "billing" | "quota" | "rate_limit" | "model_access" | "auth" | "network" | "capability" | "context" | "update" | "provider" | "unknown";
|
|
836
836
|
interface FormattedChatError extends FormattedError {
|
|
837
837
|
reason: ChatErrorReason;
|
|
838
|
+
/** The app offers a Manage usage button for this account's usage settings. */
|
|
839
|
+
manageUsage?: "chatgpt";
|
|
838
840
|
}
|
|
839
841
|
/** Compact, factual desktop copy. Raw provider detail never becomes an executable action. */
|
|
840
842
|
declare function formatChatError(error: unknown): FormattedChatError;
|
|
@@ -1037,7 +1039,7 @@ declare function opensTurn(message: Message): boolean;
|
|
|
1037
1039
|
|
|
1038
1040
|
/**
|
|
1039
1041
|
* GPT-6 family (and gpt-5.6): reasoning can't be turned off, and the models
|
|
1040
|
-
* default to low verbosity. Point releases keep the dotted version (gpt-6.
|
|
1042
|
+
* default to low verbosity. Point releases keep the dotted version (gpt-6.2-sol).
|
|
1041
1043
|
*/
|
|
1042
1044
|
declare function usesResponsesLite(model: string): boolean;
|
|
1043
1045
|
|
package/dist/index.d.ts
CHANGED
|
@@ -835,6 +835,8 @@ declare function formatErrorForDisplay(err: unknown): string;
|
|
|
835
835
|
type ChatErrorReason = "usage_limit" | "billing" | "quota" | "rate_limit" | "model_access" | "auth" | "network" | "capability" | "context" | "update" | "provider" | "unknown";
|
|
836
836
|
interface FormattedChatError extends FormattedError {
|
|
837
837
|
reason: ChatErrorReason;
|
|
838
|
+
/** The app offers a Manage usage button for this account's usage settings. */
|
|
839
|
+
manageUsage?: "chatgpt";
|
|
838
840
|
}
|
|
839
841
|
/** Compact, factual desktop copy. Raw provider detail never becomes an executable action. */
|
|
840
842
|
declare function formatChatError(error: unknown): FormattedChatError;
|
|
@@ -1037,7 +1039,7 @@ declare function opensTurn(message: Message): boolean;
|
|
|
1037
1039
|
|
|
1038
1040
|
/**
|
|
1039
1041
|
* GPT-6 family (and gpt-5.6): reasoning can't be turned off, and the models
|
|
1040
|
-
* default to low verbosity. Point releases keep the dotted version (gpt-6.
|
|
1042
|
+
* default to low verbosity. Point releases keep the dotted version (gpt-6.2-sol).
|
|
1041
1043
|
*/
|
|
1042
1044
|
declare function usesResponsesLite(model: string): boolean;
|
|
1043
1045
|
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var FAST_MODE_SUFFIX = "-fast";
|
|
3
3
|
var FAST_MODE_BASE_MODELS = {
|
|
4
4
|
anthropic: ["claude-fable-5-2", "claude-opus-5-5"],
|
|
5
|
-
openai: ["gpt-6-astra", "gpt-6.
|
|
5
|
+
openai: ["gpt-6.2-astra", "gpt-6.2-sol", "gpt-6.1-terra", "gpt-6-luna"]
|
|
6
6
|
};
|
|
7
7
|
function resolveFastModeModel(provider, model) {
|
|
8
8
|
if (!model.endsWith(FAST_MODE_SUFFIX)) return { model, fast: false };
|
|
@@ -1847,7 +1847,7 @@ function toGlmReasoningEffort(level) {
|
|
|
1847
1847
|
}
|
|
1848
1848
|
function toCodexReasoningEffort(level, model) {
|
|
1849
1849
|
if (level !== "ultra") return level;
|
|
1850
|
-
return model === "gpt-6-astra" || model === "gpt-6.
|
|
1850
|
+
return model === "gpt-6.2-astra" || model === "gpt-6.2-sol" || model === "gpt-6.1-terra" ? "xhigh" : "max";
|
|
1851
1851
|
}
|
|
1852
1852
|
var DECLARED_EFFORT_ORDER = ["low", "medium", "high", "xhigh", "max"];
|
|
1853
1853
|
function effortForRequest(level, model, declared) {
|
|
@@ -4361,8 +4361,8 @@ function toGeminiToolConfig(choice, tools) {
|
|
|
4361
4361
|
if (choice === "required") return { functionCallingConfig: { mode: "ANY" } };
|
|
4362
4362
|
return { functionCallingConfig: { mode: "ANY", allowedFunctionNames: [choice.name] } };
|
|
4363
4363
|
}
|
|
4364
|
-
function
|
|
4365
|
-
return /^gemini-3(?:\.|-|$)/.test(model);
|
|
4364
|
+
function usesThinkingLevel(model) {
|
|
4365
|
+
return /^gemini-(?:[3-9]|[1-9]\d)(?:\.|-|$)/.test(model);
|
|
4366
4366
|
}
|
|
4367
4367
|
function toGemini3ThinkingLevel(level) {
|
|
4368
4368
|
switch (level) {
|
|
@@ -4392,7 +4392,7 @@ function toThinkingBudget(level) {
|
|
|
4392
4392
|
}
|
|
4393
4393
|
function toThinkingConfig(model, level) {
|
|
4394
4394
|
if (!level) return void 0;
|
|
4395
|
-
if (
|
|
4395
|
+
if (usesThinkingLevel(model)) {
|
|
4396
4396
|
return {
|
|
4397
4397
|
includeThoughts: true,
|
|
4398
4398
|
thinkingLevel: toGemini3ThinkingLevel(level)
|
|
@@ -5846,6 +5846,23 @@ function formatChatError(error) {
|
|
|
5846
5846
|
fastRejection.guidance
|
|
5847
5847
|
);
|
|
5848
5848
|
}
|
|
5849
|
+
if (code === "subscription_sharing_usage_limit_exceeded") {
|
|
5850
|
+
return {
|
|
5851
|
+
...present(
|
|
5852
|
+
"usage_limit",
|
|
5853
|
+
"ChatGPT usage limit reached",
|
|
5854
|
+
"This can be your plan\u2019s limit or the one ChatGPT sets for GG Coder. Check or raise it in Manage usage."
|
|
5855
|
+
),
|
|
5856
|
+
manageUsage: "chatgpt"
|
|
5857
|
+
};
|
|
5858
|
+
}
|
|
5859
|
+
if (code === "subscription_sharing_usage_unavailable") {
|
|
5860
|
+
return present(
|
|
5861
|
+
"provider",
|
|
5862
|
+
"ChatGPT couldn\u2019t check your plan usage",
|
|
5863
|
+
"Try again in a moment, or add an OpenAI API key to keep going."
|
|
5864
|
+
);
|
|
5865
|
+
}
|
|
5849
5866
|
if (/insufficient.*(?:balance|credits?)|(?:balance|credits?).*(?:insufficient|exhausted|depleted)|credit balance is too low|payment_required/.test(
|
|
5850
5867
|
text
|
|
5851
5868
|
)) {
|