@prestyj/core 5.30.0 → 5.30.2
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 +68 -0
- package/dist/{chunk-43OF6BOE.js → chunk-724LOLDH.js} +91 -32
- package/dist/{chunk-43OF6BOE.js.map → chunk-724LOLDH.js.map} +1 -1
- package/dist/index.cjs +92 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/model-registry.cjs +91 -32
- package/dist/model-registry.cjs.map +1 -1
- package/dist/model-registry.d.cts +3 -3
- package/dist/model-registry.d.ts +3 -3
- package/dist/model-registry.js +1 -1
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -2155,9 +2155,10 @@ var NotLoggedInError = class extends Error {
|
|
|
2155
2155
|
// src/model-registry.ts
|
|
2156
2156
|
var MODELS = [
|
|
2157
2157
|
// ── Anthropic ──────────────────────────────────────────
|
|
2158
|
-
// NOTE: Claude Mythos 5 (`claude-mythos-5
|
|
2159
|
-
// Project Glasswing
|
|
2160
|
-
// users. Re-enable once it's
|
|
2158
|
+
// NOTE: Claude Mythos 5.1 (`claude-mythos-5-1`, 2026-09-01) is kept commented
|
|
2159
|
+
// out — it's a Project Glasswing model, still "Active (invite only)" in
|
|
2160
|
+
// Anthropic's docs and unavailable to most users. Re-enable once it's
|
|
2161
|
+
// generally available.
|
|
2161
2162
|
{
|
|
2162
2163
|
// Released 2026-09-01 — replaces Fable 5 at the same $10/$50 MTok (cache
|
|
2163
2164
|
// reads drop to $0.25). Always-on adaptive thinking steered by effort;
|
|
@@ -2179,8 +2180,8 @@ var MODELS = [
|
|
|
2179
2180
|
// // Mythos-class model offered through Project Glasswing (limited
|
|
2180
2181
|
// // availability, invitation-only). Same underlying model as Fable 5.1 with
|
|
2181
2182
|
// // some safeguards lifted; kept here so approved accounts can select it.
|
|
2182
|
-
// id: "claude-mythos-5",
|
|
2183
|
-
// name: "Claude Mythos 5",
|
|
2183
|
+
// id: "claude-mythos-5-1",
|
|
2184
|
+
// name: "Claude Mythos 5.1",
|
|
2184
2185
|
// provider: "anthropic",
|
|
2185
2186
|
// contextWindow: 1_000_000,
|
|
2186
2187
|
// maxOutputTokens: 128_000,
|
|
@@ -2247,16 +2248,24 @@ var MODELS = [
|
|
|
2247
2248
|
maxThinkingLevel: "max"
|
|
2248
2249
|
},
|
|
2249
2250
|
{
|
|
2250
|
-
|
|
2251
|
-
|
|
2251
|
+
// Released 2026-10-07 — replaces Haiku 4.5 at $0.10/$0.50 MTok (prompts
|
|
2252
|
+
// up to 100K tokens; $0.50/$2.50 above). 1M context, 128K output, image
|
|
2253
|
+
// input. Adaptive thinking with the full effort ladder (low→max, xhigh
|
|
2254
|
+
// included; API default `medium`) — manual budget_tokens, non-default
|
|
2255
|
+
// sampling params and assistant prefill all 400. No server-side refusal
|
|
2256
|
+
// fallback: `fallbacks: "default"` is accepted but a refusal stays a
|
|
2257
|
+
// refusal. Haiku 4.5 is retired here — a session that still has it saved
|
|
2258
|
+
// falls back to the provider default on next start.
|
|
2259
|
+
id: "claude-haiku-5-5",
|
|
2260
|
+
name: "Claude Haiku 5.5",
|
|
2252
2261
|
provider: "anthropic",
|
|
2253
|
-
contextWindow:
|
|
2254
|
-
maxOutputTokens:
|
|
2262
|
+
contextWindow: 1e6,
|
|
2263
|
+
maxOutputTokens: 128e3,
|
|
2255
2264
|
supportsThinking: true,
|
|
2256
2265
|
supportsImages: true,
|
|
2257
2266
|
supportsVideo: false,
|
|
2258
2267
|
costTier: "low",
|
|
2259
|
-
maxThinkingLevel: "
|
|
2268
|
+
maxThinkingLevel: "max"
|
|
2260
2269
|
},
|
|
2261
2270
|
// ── OpenAI (Codex) ─────────────────────────────────────
|
|
2262
2271
|
{
|
|
@@ -2546,6 +2555,25 @@ var MODELS = [
|
|
|
2546
2555
|
costTier: "medium",
|
|
2547
2556
|
maxThinkingLevel: "high"
|
|
2548
2557
|
},
|
|
2558
|
+
// K2.7 Code HighSpeed — the same model as K2.7 Code served at ~180 tok/s
|
|
2559
|
+
// (up to ~260 on short contexts), 256K context (platform.kimi.ai model list,
|
|
2560
|
+
// 2026-10-08). The `kimi-k2.7-code` prefix gives it K2.7's always-thinking
|
|
2561
|
+
// wire handling in @prestyj/ai. The Kimi For Coding endpoint lists this model as
|
|
2562
|
+
// `kimi-for-coding-highspeed`; like `kimi-k2.7-code` and `kimi-k3`, we send
|
|
2563
|
+
// the public id there too.
|
|
2564
|
+
{
|
|
2565
|
+
id: "kimi-k2.7-code-highspeed",
|
|
2566
|
+
name: "Kimi K2.7 Code HighSpeed",
|
|
2567
|
+
provider: "moonshot",
|
|
2568
|
+
contextWindow: 262144,
|
|
2569
|
+
maxOutputTokens: 262144,
|
|
2570
|
+
supportsThinking: true,
|
|
2571
|
+
supportsImages: true,
|
|
2572
|
+
supportsVideo: true,
|
|
2573
|
+
maxVideoBytes: 100 * 1024 * 1024,
|
|
2574
|
+
costTier: "medium",
|
|
2575
|
+
maxThinkingLevel: "high"
|
|
2576
|
+
},
|
|
2549
2577
|
// ── Z.AI (GLM) ─────────────────────────────────────────
|
|
2550
2578
|
// Two GLM entries, both live on the coding endpoint (verified against its
|
|
2551
2579
|
// /models list). The pre-5.3 ids stay retired: they routed to strictly worse
|
|
@@ -2737,23 +2765,47 @@ var MODELS = [
|
|
|
2737
2765
|
// billing follows each backend's rates on the HF account (small free tier).
|
|
2738
2766
|
// Model ids are Hub repo paths, so they intentionally contain a slash — the
|
|
2739
2767
|
// same shape local/ vLLM ids already use (`local/vllm/Qwen/Qwen3-32B`).
|
|
2768
|
+
// Live GET /v1/models (2026-10-08) is the source for hosts, context and
|
|
2769
|
+
// modalities. Qwen3 Coder 480B is retired here: only one tool-calling host
|
|
2770
|
+
// (Novita) still served it. We keep bare repo ids (no :auto suffix) so the
|
|
2771
|
+
// picker matches what GET /v1/models reports.
|
|
2740
2772
|
{
|
|
2741
|
-
//
|
|
2742
|
-
//
|
|
2743
|
-
//
|
|
2744
|
-
//
|
|
2745
|
-
//
|
|
2746
|
-
|
|
2747
|
-
|
|
2773
|
+
// Moonshot's open coding model. Served with tool calling by Novita and
|
|
2774
|
+
// DeepInfra at 262K context, with image input (video is a Moonshot-API-only
|
|
2775
|
+
// upload path). It always thinks, but the router has no documented effort
|
|
2776
|
+
// control for it, so we register it as non-thinking: we never send a
|
|
2777
|
+
// reasoning_effort that a host might reject. Output is capped at half the
|
|
2778
|
+
// window so the input keeps room.
|
|
2779
|
+
id: "moonshotai/Kimi-K2.7-Code",
|
|
2780
|
+
name: "Kimi K2.7 Code",
|
|
2748
2781
|
provider: "huggingface",
|
|
2749
2782
|
contextWindow: 262144,
|
|
2750
2783
|
maxOutputTokens: 131072,
|
|
2751
2784
|
supportsThinking: false,
|
|
2752
|
-
supportsImages:
|
|
2785
|
+
supportsImages: true,
|
|
2753
2786
|
supportsVideo: false,
|
|
2754
2787
|
costTier: "medium",
|
|
2755
2788
|
maxThinkingLevel: "low"
|
|
2756
2789
|
},
|
|
2790
|
+
{
|
|
2791
|
+
// DeepSeek V4.1 Flash open weights: 1M context and image input on four
|
|
2792
|
+
// tool-calling hosts (Novita, Fireworks, Baseten, DeepInfra; $0.20–0.30 in /
|
|
2793
|
+
// $0.60–1.20 out per MTok). It is listed before gpt-oss so it becomes the
|
|
2794
|
+
// low-tier summary model, because its 1M window can take a full long
|
|
2795
|
+
// session. Thinking control over the router is unverified, so it is
|
|
2796
|
+
// registered as non-thinking. Output is a conservative 131K: hosts don't
|
|
2797
|
+
// publish the 384K first-party cap.
|
|
2798
|
+
id: "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
2799
|
+
name: "DeepSeek V4.1 Flash",
|
|
2800
|
+
provider: "huggingface",
|
|
2801
|
+
contextWindow: 1048576,
|
|
2802
|
+
maxOutputTokens: 131072,
|
|
2803
|
+
supportsThinking: false,
|
|
2804
|
+
supportsImages: true,
|
|
2805
|
+
supportsVideo: false,
|
|
2806
|
+
costTier: "low",
|
|
2807
|
+
maxThinkingLevel: "low"
|
|
2808
|
+
},
|
|
2757
2809
|
{
|
|
2758
2810
|
// OpenAI's open-weight 120B MoE (5.1B active) — general-purpose, tool-calling
|
|
2759
2811
|
// native, adjustable reasoning effort (low/medium/high, default medium) over
|
|
@@ -2806,23 +2858,30 @@ function getVideoByteLimit(modelId) {
|
|
|
2806
2858
|
if (!model?.supportsVideo) return void 0;
|
|
2807
2859
|
return model.maxVideoBytes ?? DEFAULT_MAX_VIDEO_BYTES;
|
|
2808
2860
|
}
|
|
2861
|
+
var DEFAULT_MODEL_IDS = {
|
|
2862
|
+
xiaomi: "mimo-v2.6-pro",
|
|
2863
|
+
openai: "gpt-6.1-sol",
|
|
2864
|
+
gemini: "gemini-3.1-flash-lite",
|
|
2865
|
+
glm: "glm-5.3",
|
|
2866
|
+
moonshot: "kimi-k3",
|
|
2867
|
+
minimax: "MiniMax-M3",
|
|
2868
|
+
deepseek: "deepseek-v4-pro",
|
|
2869
|
+
huggingface: "moonshotai/Kimi-K2.7-Code",
|
|
2870
|
+
openrouter: "qwen/qwen3.8-max",
|
|
2871
|
+
sakana: "fugu",
|
|
2872
|
+
xai: "grok-4.7"
|
|
2873
|
+
};
|
|
2874
|
+
var FALLBACK_DEFAULT_MODEL_ID = "claude-sonnet-5-5";
|
|
2875
|
+
function registeredModel(id) {
|
|
2876
|
+
const model = MODELS.find((m) => m.id === id);
|
|
2877
|
+
if (!model) throw new Error(`Default model "${id}" is not in the model registry`);
|
|
2878
|
+
return model;
|
|
2879
|
+
}
|
|
2809
2880
|
function getDefaultModel(provider) {
|
|
2810
|
-
if (provider === "xiaomi") return MODELS.find((m) => m.id === "mimo-v2.6-pro");
|
|
2811
|
-
if (provider === "openai") return MODELS.find((m) => m.id === "gpt-6.1-sol");
|
|
2812
|
-
if (provider === "gemini") return MODELS.find((m) => m.id === "gemini-3.1-flash-lite");
|
|
2813
|
-
if (provider === "glm") return MODELS.find((m) => m.id === "glm-5.3");
|
|
2814
|
-
if (provider === "moonshot") return MODELS.find((m) => m.id === "kimi-k3");
|
|
2815
|
-
if (provider === "minimax") return MODELS.find((m) => m.id === "MiniMax-M3");
|
|
2816
|
-
if (provider === "deepseek") return MODELS.find((m) => m.id === "deepseek-v4-pro");
|
|
2817
|
-
if (provider === "huggingface")
|
|
2818
|
-
return MODELS.find((m) => m.id === "Qwen/Qwen3-Coder-480B-A35B-Instruct");
|
|
2819
|
-
if (provider === "openrouter") return MODELS.find((m) => m.id === "qwen/qwen3.8-max");
|
|
2820
|
-
if (provider === "sakana") return MODELS.find((m) => m.id === "fugu");
|
|
2821
|
-
if (provider === "xai") return MODELS.find((m) => m.id === "grok-4.7");
|
|
2822
2881
|
if (provider === "local") {
|
|
2823
2882
|
return getModelsForProvider("local")[0] ?? PLACEHOLDER_LOCAL_MODEL;
|
|
2824
2883
|
}
|
|
2825
|
-
return
|
|
2884
|
+
return registeredModel(DEFAULT_MODEL_IDS[provider] ?? FALLBACK_DEFAULT_MODEL_ID);
|
|
2826
2885
|
}
|
|
2827
2886
|
var PLACEHOLDER_LOCAL_MODEL = {
|
|
2828
2887
|
id: "local/none/none",
|
|
@@ -2916,10 +2975,10 @@ function isGlmModel(provider) {
|
|
|
2916
2975
|
return provider === "glm";
|
|
2917
2976
|
}
|
|
2918
2977
|
function isAnthropicXhighModel(provider, model) {
|
|
2919
|
-
return provider === "anthropic" && /opus-5|opus-4[-.]8|opus-4[-.]7|sonnet-5[-.]5/.test(model);
|
|
2978
|
+
return provider === "anthropic" && /opus-5|opus-4[-.]8|opus-4[-.]7|sonnet-5[-.]5|haiku-5[-.]5/.test(model);
|
|
2920
2979
|
}
|
|
2921
2980
|
function isAnthropicAdaptiveModel(provider, model) {
|
|
2922
|
-
return provider === "anthropic" && /opus-5|opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-5|fable-5|mythos-5/.test(model);
|
|
2981
|
+
return provider === "anthropic" && /opus-5|opus-4[-.]8|opus-4[-.]7|opus-4[-.]6|sonnet-5|haiku-5|fable-5|mythos-5/.test(model);
|
|
2923
2982
|
}
|
|
2924
2983
|
function getSupportedThinkingLevels(provider, model) {
|
|
2925
2984
|
if (provider === "local") {
|