@kenkaiiii/gg-core 5.82.0 → 5.83.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-6MT277JN.js → chunk-JJED477O.js} +82 -44
- package/dist/chunk-JJED477O.js.map +1 -0
- package/dist/index.cjs +112 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +36 -5
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +73 -43
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.d.cts +41 -1
- package/dist/model-registry.d.ts +41 -1
- package/dist/model-registry.js +7 -3
- package/package.json +2 -2
- package/dist/chunk-6MT277JN.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelInfo } from './model-registry.cjs';
|
|
2
|
-
export { ContextWindowOptions, DEFAULT_MAX_VIDEO_BYTES, MODELS, clearRuntimeModels, getAllModels, getAuthStorageKey, getAuthStorageKeys, getContextWindow, getDefaultModel, getDefaultThinkingLevel, getMaxThinkingLevel, getModel, getModelsForProvider, getSummaryModel, getToolResultCharLimit, getVideoByteLimit, registerRuntimeModels, usesOpenAICodexTransport } from './model-registry.cjs';
|
|
2
|
+
export { ContextWindowOptions, DEFAULT_MAX_VIDEO_BYTES, MODELS, ModelBilling, clearRuntimeModels, getAllModels, getAuthStorageKey, getAuthStorageKeys, getContextWindow, getDefaultModel, getDefaultThinkingLevel, getMaxThinkingLevel, getModel, getModelsForProvider, getSummaryModel, getToolResultCharLimit, getVideoByteLimit, isPaidModel, registerRuntimeModels, usesOpenAICodexTransport, withoutPaidTier } from './model-registry.cjs';
|
|
3
3
|
import { ThinkingLevel, Provider } from '@kenkaiiii/gg-ai';
|
|
4
4
|
export { AppPaths, getAppPaths } from './paths.cjs';
|
|
5
5
|
|
|
@@ -270,6 +270,16 @@ declare function providerStorageKeys(provider: string): string[];
|
|
|
270
270
|
* order, is decided per-model via `getAuthStorageKeys()` in model-registry.ts.
|
|
271
271
|
*/
|
|
272
272
|
declare const XIAOMI_CREDITS_KEY = "xiaomi-credits";
|
|
273
|
+
/**
|
|
274
|
+
* Storage key for a Gemini API key (Google AI Studio, billed per token), served
|
|
275
|
+
* by the public Gemini API at {@link GEMINI_API_KEY_BASE_URL}. Kept distinct from
|
|
276
|
+
* the `gemini` entry, which holds the Code Assist OAuth login: Google stopped
|
|
277
|
+
* serving Code Assist to personal accounts on 2026-06-18, so an API key is how
|
|
278
|
+
* those accounts reach Gemini at all, and a licensed account may hold both.
|
|
279
|
+
*/
|
|
280
|
+
declare const GEMINI_API_KEY = "gemini-api";
|
|
281
|
+
/** Public Gemini API (AI Studio key). The transport routes on this base URL. */
|
|
282
|
+
declare const GEMINI_API_KEY_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
|
|
273
283
|
/**
|
|
274
284
|
* Prefix for local-endpoint credentials (`local:ollama`, `local:lmstudio`, …).
|
|
275
285
|
* One entry per endpoint, each carrying that endpoint's `baseUrl`, so the
|
|
@@ -840,4 +850,4 @@ interface AutoUpdater {
|
|
|
840
850
|
}
|
|
841
851
|
declare function createAutoUpdater(config: AutoUpdateConfig): AutoUpdater;
|
|
842
852
|
|
|
843
|
-
export { AUTH_PROVIDERS, type ApiKeyVariant, type AuthMethod, type AuthMethodMeta, type AuthProviderMeta, AuthStorage, type AutoUpdateConfig, type AutoUpdater, DEFAULT_LOCAL_ENDPOINTS, type DiscoverOptions, type DiscoveryResult, type DualAuthProvider, FALLBACK_CONTEXT_WINDOW, type InlineButton, LOCAL_API_KEY_PLACEHOLDER, LOCAL_AUTH_KEY_PREFIX, type LocalEndpoint, type LocalEndpointKind, type LocalEndpointProbe, type LocalModel, type LogLevel, MOONSHOT_OAUTH_KEY, ModelInfo, NotLoggedInError, type OAuthCredentials, type OAuthLoginCallbacks, PLAN_MODE_THINKING_CAP, type ProbeOptions, type ProgressCallback, SubscriptionUsageError, type SubscriptionUsageProvider, type SubscriptionUsageSnapshot, type SubscriptionUsageWindow, TelegramBot, type TelegramConfig, type TelegramMessage, type TelegramUpdate, type TelegramVoiceMessage, XAI_OAUTH_KEY, XIAOMI_CREDITS_KEY, authPriorityNote, clampThinkingForPlanMode, clearLocalDiscoveryCache, closeLogger, createAutoUpdater, decodeOggOpus, describeAuthMethods, discoverLocalModels, downmixToMono, dualAuthProvider, dualAuthProviderByOAuthKey, endpointRoot, fetchSubscriptionUsage, findProbedModel, formatLocalModelId, generatePKCE, getAuthProvider, getClaudeCliUserAgent, getClaudeCodeVersion, getLowestThinkingLevel, getNextThinkingLevel, getSessionId, getSupportedThinkingLevels, grokCliBaseUrl, grokCliHeaders, isGrokCliEndpoint, isKimiCodingEndpoint, isLocalModelId, isLoggerOpen, isModelLoaded, isThinkingLevelSupported, kimiCodeBaseUrl, kimiCodingHeaders, localAuthStorageKey, log, loginAnthropic, loginGemini, loginKimi, loginOpenAI, loginXai, oauthStorageKey, openLog, parseLocalModelId, probeEndpoint, providerStorageKeys, readStoredBaseUrlSync, refreshAnthropicToken, refreshGeminiToken, refreshKimiToken, refreshOpenAIToken, refreshXaiToken, registerLogCleanup, resample, setProgressCallback, toModelInfo, transcribeVoice, withFileLock };
|
|
853
|
+
export { AUTH_PROVIDERS, type ApiKeyVariant, type AuthMethod, type AuthMethodMeta, type AuthProviderMeta, AuthStorage, type AutoUpdateConfig, type AutoUpdater, DEFAULT_LOCAL_ENDPOINTS, type DiscoverOptions, type DiscoveryResult, type DualAuthProvider, FALLBACK_CONTEXT_WINDOW, GEMINI_API_KEY, GEMINI_API_KEY_BASE_URL, type InlineButton, LOCAL_API_KEY_PLACEHOLDER, LOCAL_AUTH_KEY_PREFIX, type LocalEndpoint, type LocalEndpointKind, type LocalEndpointProbe, type LocalModel, type LogLevel, MOONSHOT_OAUTH_KEY, ModelInfo, NotLoggedInError, type OAuthCredentials, type OAuthLoginCallbacks, PLAN_MODE_THINKING_CAP, type ProbeOptions, type ProgressCallback, SubscriptionUsageError, type SubscriptionUsageProvider, type SubscriptionUsageSnapshot, type SubscriptionUsageWindow, TelegramBot, type TelegramConfig, type TelegramMessage, type TelegramUpdate, type TelegramVoiceMessage, XAI_OAUTH_KEY, XIAOMI_CREDITS_KEY, authPriorityNote, clampThinkingForPlanMode, clearLocalDiscoveryCache, closeLogger, createAutoUpdater, decodeOggOpus, describeAuthMethods, discoverLocalModels, downmixToMono, dualAuthProvider, dualAuthProviderByOAuthKey, endpointRoot, fetchSubscriptionUsage, findProbedModel, formatLocalModelId, generatePKCE, getAuthProvider, getClaudeCliUserAgent, getClaudeCodeVersion, getLowestThinkingLevel, getNextThinkingLevel, getSessionId, getSupportedThinkingLevels, grokCliBaseUrl, grokCliHeaders, isGrokCliEndpoint, isKimiCodingEndpoint, isLocalModelId, isLoggerOpen, isModelLoaded, isThinkingLevelSupported, kimiCodeBaseUrl, kimiCodingHeaders, localAuthStorageKey, log, loginAnthropic, loginGemini, loginKimi, loginOpenAI, loginXai, oauthStorageKey, openLog, parseLocalModelId, probeEndpoint, providerStorageKeys, readStoredBaseUrlSync, refreshAnthropicToken, refreshGeminiToken, refreshKimiToken, refreshOpenAIToken, refreshXaiToken, registerLogCleanup, resample, setProgressCallback, toModelInfo, transcribeVoice, withFileLock };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelInfo } from './model-registry.js';
|
|
2
|
-
export { ContextWindowOptions, DEFAULT_MAX_VIDEO_BYTES, MODELS, clearRuntimeModels, getAllModels, getAuthStorageKey, getAuthStorageKeys, getContextWindow, getDefaultModel, getDefaultThinkingLevel, getMaxThinkingLevel, getModel, getModelsForProvider, getSummaryModel, getToolResultCharLimit, getVideoByteLimit, registerRuntimeModels, usesOpenAICodexTransport } from './model-registry.js';
|
|
2
|
+
export { ContextWindowOptions, DEFAULT_MAX_VIDEO_BYTES, MODELS, ModelBilling, clearRuntimeModels, getAllModels, getAuthStorageKey, getAuthStorageKeys, getContextWindow, getDefaultModel, getDefaultThinkingLevel, getMaxThinkingLevel, getModel, getModelsForProvider, getSummaryModel, getToolResultCharLimit, getVideoByteLimit, isPaidModel, registerRuntimeModels, usesOpenAICodexTransport, withoutPaidTier } from './model-registry.js';
|
|
3
3
|
import { ThinkingLevel, Provider } from '@kenkaiiii/gg-ai';
|
|
4
4
|
export { AppPaths, getAppPaths } from './paths.js';
|
|
5
5
|
|
|
@@ -270,6 +270,16 @@ declare function providerStorageKeys(provider: string): string[];
|
|
|
270
270
|
* order, is decided per-model via `getAuthStorageKeys()` in model-registry.ts.
|
|
271
271
|
*/
|
|
272
272
|
declare const XIAOMI_CREDITS_KEY = "xiaomi-credits";
|
|
273
|
+
/**
|
|
274
|
+
* Storage key for a Gemini API key (Google AI Studio, billed per token), served
|
|
275
|
+
* by the public Gemini API at {@link GEMINI_API_KEY_BASE_URL}. Kept distinct from
|
|
276
|
+
* the `gemini` entry, which holds the Code Assist OAuth login: Google stopped
|
|
277
|
+
* serving Code Assist to personal accounts on 2026-06-18, so an API key is how
|
|
278
|
+
* those accounts reach Gemini at all, and a licensed account may hold both.
|
|
279
|
+
*/
|
|
280
|
+
declare const GEMINI_API_KEY = "gemini-api";
|
|
281
|
+
/** Public Gemini API (AI Studio key). The transport routes on this base URL. */
|
|
282
|
+
declare const GEMINI_API_KEY_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
|
|
273
283
|
/**
|
|
274
284
|
* Prefix for local-endpoint credentials (`local:ollama`, `local:lmstudio`, …).
|
|
275
285
|
* One entry per endpoint, each carrying that endpoint's `baseUrl`, so the
|
|
@@ -840,4 +850,4 @@ interface AutoUpdater {
|
|
|
840
850
|
}
|
|
841
851
|
declare function createAutoUpdater(config: AutoUpdateConfig): AutoUpdater;
|
|
842
852
|
|
|
843
|
-
export { AUTH_PROVIDERS, type ApiKeyVariant, type AuthMethod, type AuthMethodMeta, type AuthProviderMeta, AuthStorage, type AutoUpdateConfig, type AutoUpdater, DEFAULT_LOCAL_ENDPOINTS, type DiscoverOptions, type DiscoveryResult, type DualAuthProvider, FALLBACK_CONTEXT_WINDOW, type InlineButton, LOCAL_API_KEY_PLACEHOLDER, LOCAL_AUTH_KEY_PREFIX, type LocalEndpoint, type LocalEndpointKind, type LocalEndpointProbe, type LocalModel, type LogLevel, MOONSHOT_OAUTH_KEY, ModelInfo, NotLoggedInError, type OAuthCredentials, type OAuthLoginCallbacks, PLAN_MODE_THINKING_CAP, type ProbeOptions, type ProgressCallback, SubscriptionUsageError, type SubscriptionUsageProvider, type SubscriptionUsageSnapshot, type SubscriptionUsageWindow, TelegramBot, type TelegramConfig, type TelegramMessage, type TelegramUpdate, type TelegramVoiceMessage, XAI_OAUTH_KEY, XIAOMI_CREDITS_KEY, authPriorityNote, clampThinkingForPlanMode, clearLocalDiscoveryCache, closeLogger, createAutoUpdater, decodeOggOpus, describeAuthMethods, discoverLocalModels, downmixToMono, dualAuthProvider, dualAuthProviderByOAuthKey, endpointRoot, fetchSubscriptionUsage, findProbedModel, formatLocalModelId, generatePKCE, getAuthProvider, getClaudeCliUserAgent, getClaudeCodeVersion, getLowestThinkingLevel, getNextThinkingLevel, getSessionId, getSupportedThinkingLevels, grokCliBaseUrl, grokCliHeaders, isGrokCliEndpoint, isKimiCodingEndpoint, isLocalModelId, isLoggerOpen, isModelLoaded, isThinkingLevelSupported, kimiCodeBaseUrl, kimiCodingHeaders, localAuthStorageKey, log, loginAnthropic, loginGemini, loginKimi, loginOpenAI, loginXai, oauthStorageKey, openLog, parseLocalModelId, probeEndpoint, providerStorageKeys, readStoredBaseUrlSync, refreshAnthropicToken, refreshGeminiToken, refreshKimiToken, refreshOpenAIToken, refreshXaiToken, registerLogCleanup, resample, setProgressCallback, toModelInfo, transcribeVoice, withFileLock };
|
|
853
|
+
export { AUTH_PROVIDERS, type ApiKeyVariant, type AuthMethod, type AuthMethodMeta, type AuthProviderMeta, AuthStorage, type AutoUpdateConfig, type AutoUpdater, DEFAULT_LOCAL_ENDPOINTS, type DiscoverOptions, type DiscoveryResult, type DualAuthProvider, FALLBACK_CONTEXT_WINDOW, GEMINI_API_KEY, GEMINI_API_KEY_BASE_URL, type InlineButton, LOCAL_API_KEY_PLACEHOLDER, LOCAL_AUTH_KEY_PREFIX, type LocalEndpoint, type LocalEndpointKind, type LocalEndpointProbe, type LocalModel, type LogLevel, MOONSHOT_OAUTH_KEY, ModelInfo, NotLoggedInError, type OAuthCredentials, type OAuthLoginCallbacks, PLAN_MODE_THINKING_CAP, type ProbeOptions, type ProgressCallback, SubscriptionUsageError, type SubscriptionUsageProvider, type SubscriptionUsageSnapshot, type SubscriptionUsageWindow, TelegramBot, type TelegramConfig, type TelegramMessage, type TelegramUpdate, type TelegramVoiceMessage, XAI_OAUTH_KEY, XIAOMI_CREDITS_KEY, authPriorityNote, clampThinkingForPlanMode, clearLocalDiscoveryCache, closeLogger, createAutoUpdater, decodeOggOpus, describeAuthMethods, discoverLocalModels, downmixToMono, dualAuthProvider, dualAuthProviderByOAuthKey, endpointRoot, fetchSubscriptionUsage, findProbedModel, formatLocalModelId, generatePKCE, getAuthProvider, getClaudeCliUserAgent, getClaudeCodeVersion, getLowestThinkingLevel, getNextThinkingLevel, getSessionId, getSupportedThinkingLevels, grokCliBaseUrl, grokCliHeaders, isGrokCliEndpoint, isKimiCodingEndpoint, isLocalModelId, isLoggerOpen, isModelLoaded, isThinkingLevelSupported, kimiCodeBaseUrl, kimiCodingHeaders, localAuthStorageKey, log, loginAnthropic, loginGemini, loginKimi, loginOpenAI, loginXai, oauthStorageKey, openLog, parseLocalModelId, probeEndpoint, providerStorageKeys, readStoredBaseUrlSync, refreshAnthropicToken, refreshGeminiToken, refreshKimiToken, refreshOpenAIToken, refreshXaiToken, registerLogCleanup, resample, setProgressCallback, toModelInfo, transcribeVoice, withFileLock };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthStorage,
|
|
3
3
|
DEFAULT_MAX_VIDEO_BYTES,
|
|
4
|
+
GEMINI_API_KEY,
|
|
5
|
+
GEMINI_API_KEY_BASE_URL,
|
|
4
6
|
LOCAL_AUTH_KEY_PREFIX,
|
|
5
7
|
MODELS,
|
|
6
8
|
MOONSHOT_OAUTH_KEY,
|
|
@@ -32,6 +34,7 @@ import {
|
|
|
32
34
|
isGrokCliEndpoint,
|
|
33
35
|
isKimiCodingEndpoint,
|
|
34
36
|
isLoggerOpen,
|
|
37
|
+
isPaidModel,
|
|
35
38
|
kimiCodeBaseUrl,
|
|
36
39
|
kimiCodingHeaders,
|
|
37
40
|
log,
|
|
@@ -52,8 +55,9 @@ import {
|
|
|
52
55
|
registerLogCleanup,
|
|
53
56
|
registerRuntimeModels,
|
|
54
57
|
usesOpenAICodexTransport,
|
|
55
|
-
withFileLock
|
|
56
|
-
|
|
58
|
+
withFileLock,
|
|
59
|
+
withoutPaidTier
|
|
60
|
+
} from "./chunk-JJED477O.js";
|
|
57
61
|
import {
|
|
58
62
|
getAppPaths
|
|
59
63
|
} from "./chunk-EAIPT76S.js";
|
|
@@ -472,8 +476,28 @@ var AUTH_PROVIDERS = [
|
|
|
472
476
|
{
|
|
473
477
|
value: "gemini",
|
|
474
478
|
label: "Gemini",
|
|
475
|
-
description: "Gemini 3.8 Flash, 3.5 Flash Lite, 3.
|
|
476
|
-
methods: ["oauth"]
|
|
479
|
+
description: "Gemini 3.8 Flash, 3.5 Flash Lite, 3.1 Flash Lite, 3.5 Flash, 3.1 Pro (Preview)",
|
|
480
|
+
methods: ["oauth", "apikey"],
|
|
481
|
+
apiKeyLabel: "Gemini",
|
|
482
|
+
apiKeyBaseUrl: GEMINI_API_KEY_BASE_URL,
|
|
483
|
+
// Stored under its own key so it never overwrites the `gemini` OAuth login.
|
|
484
|
+
apiKeyVariants: [
|
|
485
|
+
{ key: GEMINI_API_KEY, label: "Google AI Studio", baseUrl: GEMINI_API_KEY_BASE_URL }
|
|
486
|
+
],
|
|
487
|
+
methodDetails: {
|
|
488
|
+
oauth: {
|
|
489
|
+
method: "oauth",
|
|
490
|
+
label: "Sign in with Google",
|
|
491
|
+
billing: "Gemini Code Assist Standard or Enterprise licence.",
|
|
492
|
+
when: "Personal Google accounts are no longer served here (Google ended it on June 18, 2026)."
|
|
493
|
+
},
|
|
494
|
+
apikey: {
|
|
495
|
+
method: "apikey",
|
|
496
|
+
label: "Gemini API key",
|
|
497
|
+
billing: "Pay-per-token from a Google AI Studio key.",
|
|
498
|
+
when: "Used first whenever it is set."
|
|
499
|
+
}
|
|
500
|
+
}
|
|
477
501
|
},
|
|
478
502
|
{
|
|
479
503
|
value: "xai",
|
|
@@ -603,6 +627,9 @@ function describeAuthMethods(provider) {
|
|
|
603
627
|
});
|
|
604
628
|
}
|
|
605
629
|
function authPriorityNote(provider) {
|
|
630
|
+
if (provider === "gemini") {
|
|
631
|
+
return "Uses the Gemini API key first when one is set; otherwise the Google sign-in.";
|
|
632
|
+
}
|
|
606
633
|
const dual = dualAuthProvider(provider);
|
|
607
634
|
if (!dual) return void 0;
|
|
608
635
|
return `Uses ${dual.oauthLabel} first; the ${dual.apiKeyLabel} takes over when it runs out, then switches back.`;
|
|
@@ -1348,6 +1375,8 @@ export {
|
|
|
1348
1375
|
DEFAULT_LOCAL_ENDPOINTS,
|
|
1349
1376
|
DEFAULT_MAX_VIDEO_BYTES,
|
|
1350
1377
|
FALLBACK_CONTEXT_WINDOW,
|
|
1378
|
+
GEMINI_API_KEY,
|
|
1379
|
+
GEMINI_API_KEY_BASE_URL,
|
|
1351
1380
|
LOCAL_API_KEY_PLACEHOLDER,
|
|
1352
1381
|
LOCAL_AUTH_KEY_PREFIX,
|
|
1353
1382
|
MODELS,
|
|
@@ -1402,6 +1431,7 @@ export {
|
|
|
1402
1431
|
isLocalModelId,
|
|
1403
1432
|
isLoggerOpen,
|
|
1404
1433
|
isModelLoaded,
|
|
1434
|
+
isPaidModel,
|
|
1405
1435
|
isThinkingLevelSupported,
|
|
1406
1436
|
kimiCodeBaseUrl,
|
|
1407
1437
|
kimiCodingHeaders,
|
|
@@ -1430,6 +1460,7 @@ export {
|
|
|
1430
1460
|
toModelInfo,
|
|
1431
1461
|
transcribeVoice,
|
|
1432
1462
|
usesOpenAICodexTransport,
|
|
1433
|
-
withFileLock
|
|
1463
|
+
withFileLock,
|
|
1464
|
+
withoutPaidTier
|
|
1434
1465
|
};
|
|
1435
1466
|
//# sourceMappingURL=index.js.map
|