@celestia-island/hikari 0.40.7 → 0.40.8
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/package.json
CHANGED
|
@@ -36,6 +36,15 @@
|
|
|
36
36
|
color: rgb(var(--color-text));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/* Mobile sheet mode: the docked sheet spans the viewport, so the fixed
|
|
40
|
+
* 18rem pop would hug the sheet's left edge with dead space to the right.
|
|
41
|
+
* Fill the sheet instead — the panel chrome keeps its own symmetric
|
|
42
|
+
* horizontal gutters (the glass content padding), so the bar and legend
|
|
43
|
+
* get equal left/right insets. Desktop stays anchored at 18rem. */
|
|
44
|
+
.hk-popover-panel.hk-is-sheet .hk-ctx-pop {
|
|
45
|
+
width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
.hk-ctx-pop-model {
|
|
40
49
|
display: flex;
|
|
41
50
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { getModelMeta, registerModelCatalog } from "./HkModelCatalog";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The simulated-world roster (integration world_service `agent_models`):
|
|
7
|
+
* every model id a chest card can carry must resolve a context window, or
|
|
8
|
+
* its context ring degrades to the empty "–" state — the "only the sample
|
|
9
|
+
* card shows usage" regression. The builtin catalog is the fallback that
|
|
10
|
+
* keeps unknown-to-nothing lineups legible.
|
|
11
|
+
*/
|
|
12
|
+
const WORLD_LINEUP = [
|
|
13
|
+
"glm-5.3-flash",
|
|
14
|
+
"claude-opus-5",
|
|
15
|
+
"deepseek-v4-pro",
|
|
16
|
+
"deepseek-v4-flash",
|
|
17
|
+
"gemini-3.1-flash-preview",
|
|
18
|
+
"gpt-5.5-pro",
|
|
19
|
+
"gemini-3.1-pro-preview",
|
|
20
|
+
"gpt-5.4",
|
|
21
|
+
"gpt-5.4-nano",
|
|
22
|
+
"claude-haiku-4-5",
|
|
23
|
+
"gemini-3-flash",
|
|
24
|
+
"qwen3.7:14b",
|
|
25
|
+
"qwen3.8:27b",
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
describe("HkModelCatalog builtin specs", () => {
|
|
29
|
+
it("resolves every world-lineup model id to a positive context window", () => {
|
|
30
|
+
for (const model of WORLD_LINEUP) {
|
|
31
|
+
const meta = getModelMeta(model);
|
|
32
|
+
expect(meta, `${model} resolves`).toBeDefined();
|
|
33
|
+
expect(meta?.contextWindow ?? 0, `${model} window`).toBeGreaterThan(0);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("keeps ollama-style colon tags whole (only # splits)", () => {
|
|
38
|
+
expect(getModelMeta("qwen3.7:14b")?.contextWindow).toBe(262_144);
|
|
39
|
+
expect(getModelMeta("qwen3.8:27b")?.contextWindow).toBe(262_144);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("still strips a #tag before lookup", () => {
|
|
43
|
+
expect(getModelMeta("deepseek-v4-pro#2")?.contextWindow).toBe(128_000);
|
|
44
|
+
expect(getModelMeta("claude-opus-5#7")?.contextWindow).toBe(200_000);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("lets the registered catalog win over the builtin entries", () => {
|
|
48
|
+
registerModelCatalog({ "claude-opus-5": { contextWindow: 999 } });
|
|
49
|
+
expect(getModelMeta("claude-opus-5")?.contextWindow).toBe(999);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -64,6 +64,59 @@ const BUILTIN_CATALOG: HModelCatalog = {
|
|
|
64
64
|
pricing: { in: 2, out: 8 },
|
|
65
65
|
vision: true, reasoning: true, tools: true,
|
|
66
66
|
},
|
|
67
|
+
"glm-5.3-flash": {
|
|
68
|
+
contextWindow: 128_000, maxOutput: 32_000,
|
|
69
|
+
pricing: { in: 0.5, out: 2 },
|
|
70
|
+
vision: false, reasoning: true, tools: true,
|
|
71
|
+
},
|
|
72
|
+
"gpt-5.5-pro": {
|
|
73
|
+
contextWindow: 400_000, maxOutput: 100_000,
|
|
74
|
+
pricing: { in: 10, out: 50, cached: 1 },
|
|
75
|
+
vision: true, reasoning: true, tools: true,
|
|
76
|
+
},
|
|
77
|
+
"gpt-5.4": {
|
|
78
|
+
contextWindow: 400_000, maxOutput: 64_000,
|
|
79
|
+
pricing: { in: 2.5, out: 15, cached: 0.25 },
|
|
80
|
+
vision: true, reasoning: true, tools: true,
|
|
81
|
+
},
|
|
82
|
+
"gpt-5.4-nano": {
|
|
83
|
+
contextWindow: 400_000, maxOutput: 16_000,
|
|
84
|
+
pricing: { in: 0.2, out: 1.2, cached: 0.05 },
|
|
85
|
+
vision: false, reasoning: false, tools: true,
|
|
86
|
+
},
|
|
87
|
+
"claude-opus-5": {
|
|
88
|
+
contextWindow: 200_000, maxOutput: 64_000,
|
|
89
|
+
pricing: { in: 5, out: 25, cached: 0.5 },
|
|
90
|
+
vision: true, reasoning: true, tools: true,
|
|
91
|
+
},
|
|
92
|
+
"claude-haiku-4-5": {
|
|
93
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
94
|
+
pricing: { in: 0.8, out: 4, cached: 0.08 },
|
|
95
|
+
vision: false, reasoning: false, tools: true,
|
|
96
|
+
},
|
|
97
|
+
"gemini-3.1-pro-preview": {
|
|
98
|
+
contextWindow: 1_000_000, maxOutput: 64_000,
|
|
99
|
+
pricing: { in: 5, out: 30 },
|
|
100
|
+
vision: true, reasoning: true, tools: true,
|
|
101
|
+
},
|
|
102
|
+
"gemini-3.1-flash-preview": {
|
|
103
|
+
contextWindow: 1_000_000, maxOutput: 64_000,
|
|
104
|
+
pricing: { in: 1.5, out: 10 },
|
|
105
|
+
vision: true, reasoning: true, tools: true,
|
|
106
|
+
},
|
|
107
|
+
"gemini-3-flash": {
|
|
108
|
+
contextWindow: 1_000_000, maxOutput: 32_000,
|
|
109
|
+
pricing: { in: 1.5, out: 9 },
|
|
110
|
+
vision: true, reasoning: false, tools: true,
|
|
111
|
+
},
|
|
112
|
+
"qwen3.7:14b": {
|
|
113
|
+
contextWindow: 262_144, maxOutput: 32_768,
|
|
114
|
+
vision: false, reasoning: true, tools: true,
|
|
115
|
+
},
|
|
116
|
+
"qwen3.8:27b": {
|
|
117
|
+
contextWindow: 262_144, maxOutput: 32_768,
|
|
118
|
+
vision: false, reasoning: true, tools: true,
|
|
119
|
+
},
|
|
67
120
|
};
|
|
68
121
|
|
|
69
122
|
/**
|