@kenkaiiii/gg-ai 5.48.0 → 5.49.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/index.cjs +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -126,6 +126,7 @@ var PROVIDER_DISPLAY = {
|
|
|
126
126
|
openrouter: "OpenRouter",
|
|
127
127
|
sakana: "Sakana",
|
|
128
128
|
xai: "xAI (Grok)",
|
|
129
|
+
huggingface: "Hugging Face",
|
|
129
130
|
xiaomi: "Xiaomi (MiMo)",
|
|
130
131
|
minimax: "MiniMax"
|
|
131
132
|
};
|
|
@@ -3027,6 +3028,7 @@ var CODE_ASSIST_SUPPORTED_MODELS = /* @__PURE__ */ new Set([
|
|
|
3027
3028
|
"gemini-3.5-flash",
|
|
3028
3029
|
"gemini-3-flash",
|
|
3029
3030
|
"gemini-3.1-flash-lite",
|
|
3031
|
+
"gemini-3.7-flash",
|
|
3030
3032
|
"gemini-2.5-pro",
|
|
3031
3033
|
"gemini-2.5-flash",
|
|
3032
3034
|
"gemma-4-31b-it",
|
|
@@ -3049,13 +3051,14 @@ var ACCOUNT_GATED_MODELS = /* @__PURE__ */ new Set([
|
|
|
3049
3051
|
"gemini-3-flash",
|
|
3050
3052
|
"gemini-3.5-flash",
|
|
3051
3053
|
"gemini-3.1-pro-preview",
|
|
3052
|
-
"gemini-3.1-pro-preview-customtools"
|
|
3054
|
+
"gemini-3.1-pro-preview-customtools",
|
|
3055
|
+
"gemini-3.7-flash"
|
|
3053
3056
|
]);
|
|
3054
3057
|
function accountGatedMessage(model) {
|
|
3055
3058
|
return `Your Google account isn't entitled to "${model}" over Gemini Code Assist OAuth, so the API reports it as not found. This is an account-access limit, not a ggcoder bug.`;
|
|
3056
3059
|
}
|
|
3057
3060
|
function accountGatedHint() {
|
|
3058
|
-
return `Newer Gemini models (3.5 Flash, 3.1 Pro Preview) are available only to Code Assist Standard/Enterprise accounts with preview/GA access enabled by a cloud admin \u2014 free/personal accounts usually can't call them. Switch to Gemini 3.1 Flash Lite (it works on this account) with /model, or sign in with a Code Assist Standard/Enterprise account that has preview access.`;
|
|
3061
|
+
return `Newer Gemini models (3.7 Flash, 3.5 Flash, 3.1 Pro Preview) are available only to Code Assist Standard/Enterprise accounts with preview/GA access enabled by a cloud admin \u2014 free/personal accounts usually can't call them. Switch to Gemini 3.1 Flash Lite (it works on this account) with /model, or sign in with a Code Assist Standard/Enterprise account that has preview access.`;
|
|
3059
3062
|
}
|
|
3060
3063
|
function formatErrorMessage(status, body, model) {
|
|
3061
3064
|
if (status === 404 && !CODE_ASSIST_SUPPORTED_MODELS.has(model)) {
|
|
@@ -3733,6 +3736,18 @@ providerRegistry.register("openrouter", {
|
|
|
3733
3736
|
baseUrl: options.baseUrl ?? "https://openrouter.ai/api/v1"
|
|
3734
3737
|
})
|
|
3735
3738
|
});
|
|
3739
|
+
providerRegistry.register("huggingface", {
|
|
3740
|
+
// Hugging Face Inference Providers router — one HF token (hf.co/settings/tokens,
|
|
3741
|
+
// "Make calls to Inference Providers" permission) routes to whichever hosted
|
|
3742
|
+
// backend serves each open model. Chat Completions-compatible; model ids are
|
|
3743
|
+
// Hub repo paths ("Qwen/Qwen3-Coder-480B-A35B-Instruct"), optionally with an
|
|
3744
|
+
// ":auto"/":fastest"/":cheapest" provider-selection suffix. Billing follows
|
|
3745
|
+
// each backend's per-token rates on the HF account (small free tier).
|
|
3746
|
+
stream: (options) => streamOpenAI({
|
|
3747
|
+
...options,
|
|
3748
|
+
baseUrl: options.baseUrl ?? "https://router.huggingface.co/v1"
|
|
3749
|
+
})
|
|
3750
|
+
});
|
|
3736
3751
|
providerRegistry.register("sakana", {
|
|
3737
3752
|
// Sakana Fugu is a multi-agent system exposed as a standard LLM through the
|
|
3738
3753
|
// OpenAI-compatible Sakana API. We ride the Chat Completions transport (the
|