@kenkaiiii/gg-core 5.96.2 → 5.97.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.
@@ -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 {
@@ -2026,6 +2038,12 @@ var CLAUDE_FAST_BILLING = {
2026
2038
  paid: true,
2027
2039
  standardModel: "claude-opus-5-5"
2028
2040
  };
2041
+ var CLAUDE_FABLE_FAST_BILLING = {
2042
+ label: "bills usage credits",
2043
+ detail: "Fast mode bills your Claude usage credits ($16 in / $80 out per million tokens) from the first token, never your plan's included usage.",
2044
+ paid: true,
2045
+ standardModel: "claude-fable-5-2"
2046
+ };
2029
2047
  var XIAOMI_ULTRASPEED_BILLING = {
2030
2048
  label: "bills API Credits",
2031
2049
  detail: "UltraSpeed runs only on your Xiaomi API Credits, billed per token at a higher rate than MiMo-V2.6-Pro, never on the Token Plan.",
@@ -2041,18 +2059,18 @@ var GEMINI_AUTH_KEYS = [GEMINI_API_KEY];
2041
2059
  var KIMI_AUTH_KEYS = [KIMI_CODE_KEY, "moonshot"];
2042
2060
  var MODELS = [
2043
2061
  // ── Anthropic ──────────────────────────────────────────
2044
- // NOTE: Claude Mythos 5.1 (`claude-mythos-5-1`, 2026-09-01) is kept commented
2045
- // out — it's a Project Glasswing model, still "Active (invite only)" in
2046
- // Anthropic's docs and unavailable to most users. Re-enable once it's
2047
- // generally available.
2062
+ // NOTE: Claude Mythos 5.2 (`claude-mythos-5-2`, 2026-11-09) is kept commented
2063
+ // out — it's only for organizations verified through Anthropic's verification
2064
+ // programs and unavailable to most users. Re-enable once it's generally
2065
+ // available.
2048
2066
  {
2049
- // Released 2026-09-01 — replaces Fable 5 at the same $10/$50 MTok (cache
2050
- // reads drop to $0.25). Always-on adaptive thinking steered by effort;
2051
- // forced tool use is rejected with a 400, which gg-ai never sends on the
2052
- // Anthropic path. Fable 5 is retired here — a session that still has it
2053
- // saved falls back to the provider default on next start.
2054
- id: "claude-fable-5-1",
2055
- name: "Claude Fable 5.1",
2067
+ // Released 2026-11-09 — replaces Fable 5.1 at $8/$40 MTok (down from
2068
+ // $10/$50; cache reads $0.20). Same API surface as 5.1: always-on adaptive
2069
+ // thinking steered by effort, forced tool use rejected with a 400 (gg-ai
2070
+ // never sends it on the Anthropic path). Fable 5.1 is retired here — a
2071
+ // session that still has it saved falls back to the provider default.
2072
+ id: "claude-fable-5-2",
2073
+ name: "Claude Fable 5.2",
2056
2074
  provider: "anthropic",
2057
2075
  contextWindow: 1e6,
2058
2076
  maxOutputTokens: 128e3,
@@ -2062,12 +2080,28 @@ var MODELS = [
2062
2080
  costTier: "high",
2063
2081
  maxThinkingLevel: "max"
2064
2082
  },
2083
+ {
2084
+ // Fable 5.2 in fast mode: the same model at up to 2.5x output tokens/sec,
2085
+ // $16/$80 MTok. Sent as `claude-fable-5-2` + `speed: "fast"`; on a Claude
2086
+ // subscription it bills usage credits only, like Opus 5.5 Fast.
2087
+ id: "claude-fable-5-2-fast",
2088
+ name: "Claude Fable 5.2 Fast",
2089
+ provider: "anthropic",
2090
+ contextWindow: 1e6,
2091
+ maxOutputTokens: 128e3,
2092
+ supportsThinking: true,
2093
+ supportsImages: true,
2094
+ supportsVideo: false,
2095
+ costTier: "high",
2096
+ maxThinkingLevel: "max",
2097
+ billing: CLAUDE_FABLE_FAST_BILLING
2098
+ },
2065
2099
  // {
2066
2100
  // // Mythos-class model offered through Project Glasswing (limited
2067
- // // availability, invitation-only). Same underlying model as Fable 5.1 with
2068
- // // some safeguards lifted; kept here so approved accounts can select it.
2069
- // id: "claude-mythos-5-1",
2070
- // name: "Claude Mythos 5.1",
2101
+ // // availability, verified organizations only). Same specs and pricing as
2102
+ // // Fable 5.2; kept here so approved accounts can select it.
2103
+ // id: "claude-mythos-5-2",
2104
+ // name: "Claude Mythos 5.2",
2071
2105
  // provider: "anthropic",
2072
2106
  // contextWindow: 1_000_000,
2073
2107
  // maxOutputTokens: 128_000,
@@ -3041,4 +3075,4 @@ export {
3041
3075
  getDefaultThinkingLevel,
3042
3076
  getSummaryModel
3043
3077
  };
3044
- //# sourceMappingURL=chunk-J7W5HS6X.js.map
3078
+ //# sourceMappingURL=chunk-OVIBOKD4.js.map