@kenkaiiii/gg-core 5.97.0 → 5.98.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/dist/{chunk-2ZTKYSSY.js → chunk-Q6ZD2VQV.js} +102 -1
- package/dist/chunk-Q6ZD2VQV.js.map +1 -0
- package/dist/index.cjs +197 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +93 -1
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +89 -0
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-2ZTKYSSY.js.map +0 -1
|
@@ -1042,6 +1042,7 @@ import path3 from "path";
|
|
|
1042
1042
|
import { randomBytes } from "crypto";
|
|
1043
1043
|
import { environmentSecrets, redactText, redactValue } from "@kenkaiiii/gg-ai";
|
|
1044
1044
|
var MAX_BYTES = 10 * 1024 * 1024;
|
|
1045
|
+
var ROTATED_GENERATIONS = 3;
|
|
1045
1046
|
var MIN_HEADROOM_BYTES = 64 * 1024;
|
|
1046
1047
|
var fd = null;
|
|
1047
1048
|
var logPath = null;
|
|
@@ -1058,6 +1059,17 @@ function rotateIfNeeded(filePath, force = false) {
|
|
|
1058
1059
|
const st = fs5.statSync(filePath);
|
|
1059
1060
|
if (!force && st.size <= MAX_BYTES - MIN_HEADROOM_BYTES) return;
|
|
1060
1061
|
const rotated = `${filePath}.1`;
|
|
1062
|
+
for (let generation = ROTATED_GENERATIONS - 1; generation >= 1; generation--) {
|
|
1063
|
+
const older = `${filePath}.${generation + 1}`;
|
|
1064
|
+
try {
|
|
1065
|
+
fs5.unlinkSync(older);
|
|
1066
|
+
} catch {
|
|
1067
|
+
}
|
|
1068
|
+
try {
|
|
1069
|
+
fs5.renameSync(`${filePath}.${generation}`, older);
|
|
1070
|
+
} catch {
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1061
1073
|
try {
|
|
1062
1074
|
fs5.unlinkSync(rotated);
|
|
1063
1075
|
} catch {
|
|
@@ -2755,6 +2767,93 @@ var MODELS = [
|
|
|
2755
2767
|
costTier: "medium",
|
|
2756
2768
|
maxThinkingLevel: "high"
|
|
2757
2769
|
},
|
|
2770
|
+
// ── OpenCode Console (Go subscription, then pay-as-you-go) ────────
|
|
2771
|
+
// One Console API key reaches many labs' models through opencode.ai. Ids
|
|
2772
|
+
// carry the plan prefix (`opencode-go/kimi-k3`) because the gateway reuses
|
|
2773
|
+
// the vendors' own ids; gg-ai strips it at the wire. These rows are only the
|
|
2774
|
+
// offline fallback: the desktop app replaces them with each plan's live,
|
|
2775
|
+
// public model list (core/opencode-catalog-store.ts). Limits, image input
|
|
2776
|
+
// and effort ladders are from GET /inference[/go]/v1/models (2026-11-11);
|
|
2777
|
+
// all three speak Chat Completions natively.
|
|
2778
|
+
{
|
|
2779
|
+
// Go declares `max` as K3's only effort; pay-as-you-go adds low and high.
|
|
2780
|
+
id: "opencode-go/kimi-k3",
|
|
2781
|
+
name: "Kimi K3",
|
|
2782
|
+
provider: "opencode-go",
|
|
2783
|
+
contextWindow: 1048576,
|
|
2784
|
+
maxOutputTokens: 131072,
|
|
2785
|
+
supportsThinking: true,
|
|
2786
|
+
supportsImages: true,
|
|
2787
|
+
supportsVideo: false,
|
|
2788
|
+
costTier: "high",
|
|
2789
|
+
maxThinkingLevel: "max",
|
|
2790
|
+
thinkingLevels: ["max"]
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
id: "opencode-go/glm-5.3",
|
|
2794
|
+
name: "GLM-5.3",
|
|
2795
|
+
provider: "opencode-go",
|
|
2796
|
+
contextWindow: 1e6,
|
|
2797
|
+
maxOutputTokens: 131072,
|
|
2798
|
+
supportsThinking: true,
|
|
2799
|
+
supportsImages: false,
|
|
2800
|
+
supportsVideo: false,
|
|
2801
|
+
costTier: "medium",
|
|
2802
|
+
maxThinkingLevel: "max",
|
|
2803
|
+
thinkingLevels: ["low", "high", "max"]
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
id: "opencode-go/glm-5.3-flash",
|
|
2807
|
+
name: "GLM-5.3-Flash",
|
|
2808
|
+
provider: "opencode-go",
|
|
2809
|
+
contextWindow: 1e6,
|
|
2810
|
+
maxOutputTokens: 131072,
|
|
2811
|
+
supportsThinking: true,
|
|
2812
|
+
supportsImages: true,
|
|
2813
|
+
supportsVideo: false,
|
|
2814
|
+
costTier: "low",
|
|
2815
|
+
maxThinkingLevel: "max",
|
|
2816
|
+
thinkingLevels: ["low", "high", "max"]
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
id: "opencode/kimi-k3",
|
|
2820
|
+
name: "Kimi K3",
|
|
2821
|
+
provider: "opencode",
|
|
2822
|
+
contextWindow: 1048576,
|
|
2823
|
+
maxOutputTokens: 131072,
|
|
2824
|
+
supportsThinking: true,
|
|
2825
|
+
supportsImages: true,
|
|
2826
|
+
supportsVideo: false,
|
|
2827
|
+
costTier: "high",
|
|
2828
|
+
maxThinkingLevel: "max",
|
|
2829
|
+
thinkingLevels: ["low", "high", "max"]
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
id: "opencode/glm-5.3",
|
|
2833
|
+
name: "GLM-5.3",
|
|
2834
|
+
provider: "opencode",
|
|
2835
|
+
contextWindow: 1e6,
|
|
2836
|
+
maxOutputTokens: 131072,
|
|
2837
|
+
supportsThinking: true,
|
|
2838
|
+
supportsImages: false,
|
|
2839
|
+
supportsVideo: false,
|
|
2840
|
+
costTier: "medium",
|
|
2841
|
+
maxThinkingLevel: "max",
|
|
2842
|
+
thinkingLevels: ["low", "high", "max"]
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
id: "opencode/glm-5.3-flash",
|
|
2846
|
+
name: "GLM-5.3-Flash",
|
|
2847
|
+
provider: "opencode",
|
|
2848
|
+
contextWindow: 1e6,
|
|
2849
|
+
maxOutputTokens: 131072,
|
|
2850
|
+
supportsThinking: true,
|
|
2851
|
+
supportsImages: true,
|
|
2852
|
+
supportsVideo: false,
|
|
2853
|
+
costTier: "low",
|
|
2854
|
+
maxThinkingLevel: "max",
|
|
2855
|
+
thinkingLevels: ["low", "high", "max"]
|
|
2856
|
+
},
|
|
2758
2857
|
// ── Hugging Face (Inference Providers router) ────────
|
|
2759
2858
|
// One HF token (hf.co/settings/tokens, "Make calls to Inference Providers"
|
|
2760
2859
|
// permission) routes to whichever hosted backend serves each open model;
|
|
@@ -2912,6 +3011,8 @@ var DEFAULT_MODEL_IDS = {
|
|
|
2912
3011
|
minimax: "MiniMax-M3.1-Flash",
|
|
2913
3012
|
deepseek: "deepseek-v4-pro",
|
|
2914
3013
|
huggingface: "moonshotai/Kimi-K2.7-Code",
|
|
3014
|
+
opencode: "opencode/kimi-k3",
|
|
3015
|
+
"opencode-go": "opencode-go/kimi-k3",
|
|
2915
3016
|
openrouter: "qwen/qwen3.8-max",
|
|
2916
3017
|
sakana: "fugu",
|
|
2917
3018
|
xai: "grok-4.7"
|
|
@@ -3063,4 +3164,4 @@ export {
|
|
|
3063
3164
|
getDefaultThinkingLevel,
|
|
3064
3165
|
getSummaryModel
|
|
3065
3166
|
};
|
|
3066
|
-
//# sourceMappingURL=chunk-
|
|
3167
|
+
//# sourceMappingURL=chunk-Q6ZD2VQV.js.map
|