@vellumai/assistant 0.8.8-dev.202606090218.6bcb462 → 0.8.8-dev.202606090318.74794fe

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.8.8-dev.202606090218.6bcb462",
3
+ "version": "0.8.8-dev.202606090318.74794fe",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1249,3 +1249,76 @@ describe("resolveDefaultProfileKey", () => {
1249
1249
  expect(resolveDefaultProfileKey("mainAgent", llm)).toBe("balanced");
1250
1250
  });
1251
1251
  });
1252
+
1253
+ describe("resolveCallSiteConfig logitBias provenance", () => {
1254
+ const kimi = "accounts/fireworks/models/kimi-k2p6";
1255
+
1256
+ test("forwards logitBias from the active profile that opted in", () => {
1257
+ const llm = LLMSchema.parse({
1258
+ default: fullDefault,
1259
+ profiles: {
1260
+ "balanced-economy": {
1261
+ provider: "fireworks",
1262
+ model: kimi,
1263
+ logitBias: "suppress-cjk",
1264
+ },
1265
+ },
1266
+ activeProfile: "balanced-economy",
1267
+ });
1268
+ expect(resolveCallSiteConfig("mainAgent", llm).logitBias).toBe(
1269
+ "suppress-cjk",
1270
+ );
1271
+ });
1272
+
1273
+ test("a higher-precedence override profile that omits logitBias clears it", () => {
1274
+ // Active profile opts in, but a pinned (override) Kimi profile did not —
1275
+ // the override must not inherit suppress-cjk just because it resolves to
1276
+ // Fireworks.
1277
+ const llm = LLMSchema.parse({
1278
+ default: fullDefault,
1279
+ profiles: {
1280
+ "balanced-economy": {
1281
+ provider: "fireworks",
1282
+ model: kimi,
1283
+ logitBias: "suppress-cjk",
1284
+ },
1285
+ "my-kimi": { provider: "fireworks", model: kimi },
1286
+ },
1287
+ activeProfile: "balanced-economy",
1288
+ });
1289
+ const resolved = resolveCallSiteConfig("mainAgent", llm, {
1290
+ overrideProfile: "my-kimi",
1291
+ });
1292
+ expect(resolved.logitBias).toBeUndefined();
1293
+ });
1294
+
1295
+ test("does not leak the active profile's logitBias into a call site's own profile", () => {
1296
+ // For non-main call sites the call-site profile wins; since it didn't opt
1297
+ // in, the active profile's preset must not bleed through.
1298
+ const llm = LLMSchema.parse({
1299
+ default: fullDefault,
1300
+ profiles: {
1301
+ "balanced-economy": {
1302
+ provider: "fireworks",
1303
+ model: kimi,
1304
+ logitBias: "suppress-cjk",
1305
+ },
1306
+ plain: { provider: "anthropic", model: "claude-opus-4-7" },
1307
+ },
1308
+ activeProfile: "balanced-economy",
1309
+ callSites: { memoryExtraction: { profile: "plain" } },
1310
+ });
1311
+ expect(
1312
+ resolveCallSiteConfig("memoryExtraction", llm).logitBias,
1313
+ ).toBeUndefined();
1314
+ });
1315
+
1316
+ test("a logitBias on a non-profile layer (llm.default) does not apply when the winning profile omits it", () => {
1317
+ const llm = LLMSchema.parse({
1318
+ default: { ...fullDefault, logitBias: "suppress-cjk" },
1319
+ profiles: { plain: { provider: "anthropic", model: "claude-opus-4-7" } },
1320
+ activeProfile: "plain",
1321
+ });
1322
+ expect(resolveCallSiteConfig("mainAgent", llm).logitBias).toBeUndefined();
1323
+ });
1324
+ });
@@ -78,6 +78,15 @@ export function resolveCallSiteConfig(
78
78
  ): z.infer<typeof LLMConfigBase> {
79
79
  const layers: Mergeable[] = [llm.default as Mergeable];
80
80
 
81
+ // Effective logit-bias preset, tracked outside the deep-merge so it ties to
82
+ // the single highest-precedence *profile* that wins resolution rather than
83
+ // inheriting from a lower one. Profile layers are appended low→high, and each
84
+ // one fully determines the preset (a profile that omits `logitBias` clears
85
+ // any value a lower-precedence profile set), so the last profile appended
86
+ // wins — matching the merge's own precedence and including the implicit
87
+ // call-site default selected by `effectiveDefault`.
88
+ const biasRef: LogitBiasRef = { preset: undefined };
89
+
81
90
  const activeFragment = resolveProfileFragment(llm.activeProfile, llm, opts);
82
91
  const overrideFragment = resolveProfileFragment(
83
92
  opts.overrideProfile,
@@ -89,18 +98,32 @@ export function resolveCallSiteConfig(
89
98
  effectiveDefault(callSite, llm, opts.overrideProfile != null);
90
99
 
91
100
  if (callSite === "mainAgent") {
92
- appendCallSiteLayers(layers, callSite, llm, site, opts);
93
- appendProfileLayer(layers, activeFragment);
94
- appendProfileLayer(layers, overrideFragment);
101
+ appendCallSiteLayers(layers, callSite, llm, site, opts, biasRef);
102
+ appendProfileLayer(layers, activeFragment, biasRef);
103
+ appendProfileLayer(layers, overrideFragment, biasRef);
95
104
  } else {
96
- appendProfileLayer(layers, activeFragment);
97
- appendProfileLayer(layers, overrideFragment);
98
- appendCallSiteLayers(layers, callSite, llm, site, opts);
105
+ appendProfileLayer(layers, activeFragment, biasRef);
106
+ appendProfileLayer(layers, overrideFragment, biasRef);
107
+ appendCallSiteLayers(layers, callSite, llm, site, opts, biasRef);
99
108
  }
100
109
 
101
- return finalize(deepMerge(...layers.map(withImpliedProviderForKnownModel)));
110
+ const resolved = finalize(
111
+ deepMerge(...layers.map(withImpliedProviderForKnownModel)),
112
+ );
113
+ // `logitBias` is profile-scoped: the winning profile is its only source.
114
+ // Overwrite — or clear — whatever the deep-merge may have copied from a
115
+ // non-profile layer (`llm.default` or a call-site fragment), so a preset set
116
+ // outside a profile can't apply to a profile that didn't opt in.
117
+ if (biasRef.preset !== undefined) {
118
+ resolved.logitBias = biasRef.preset;
119
+ } else {
120
+ delete (resolved as { logitBias?: unknown }).logitBias;
121
+ }
122
+ return resolved;
102
123
  }
103
124
 
125
+ type LogitBiasRef = { preset: ProfileEntry["logitBias"] };
126
+
104
127
  // ---------------------------------------------------------------------------
105
128
  // Internal helpers
106
129
  // ---------------------------------------------------------------------------
@@ -261,8 +284,10 @@ function withImpliedProviderForKnownModel(source: Mergeable): Mergeable {
261
284
  function appendProfileLayer(
262
285
  layers: Mergeable[],
263
286
  profile: ProfileEntry | undefined,
287
+ biasRef: LogitBiasRef,
264
288
  ): void {
265
289
  if (profile != null) {
290
+ biasRef.preset = profile.logitBias;
266
291
  layers.push(profileConfigFragment(profile));
267
292
  }
268
293
  }
@@ -273,6 +298,7 @@ function appendCallSiteLayers(
273
298
  llm: z.infer<typeof LLMSchema>,
274
299
  site: z.infer<typeof LLMSchema>["callSites"][LLMCallSite] | undefined,
275
300
  opts: ResolveCallSiteOpts,
301
+ biasRef: LogitBiasRef,
276
302
  ): void {
277
303
  if (site != null) {
278
304
  if (site.profile != null) {
@@ -286,6 +312,7 @@ function appendCallSiteLayers(
286
312
  `LLM call site "${callSite}" references undefined profile "${site.profile}"`,
287
313
  );
288
314
  }
315
+ biasRef.preset = profileFragment.logitBias;
289
316
  layers.push(profileConfigFragment(profileFragment));
290
317
  }
291
318
  // Strip the `profile` discriminator before merging — it isn't a
@@ -304,6 +331,11 @@ function profileConfigFragment(profile: ProfileEntry): Mergeable {
304
331
  // profile before this point), but strip it defensively so it can never
305
332
  // leak into the merged `LLMConfigBase`.
306
333
  mix: _mix,
334
+ // `logitBias` is profile-identity metadata, not inheritable config: a
335
+ // preset must apply only to the profile that opted in, never bleed from a
336
+ // lower-precedence (e.g. active) profile into one that merely inherited it.
337
+ // `RetryProvider` resolves it from the applied profile, not the merge.
338
+ logitBias: _logitBias,
307
339
  ...config
308
340
  } = profile;
309
341
  return config as Mergeable;
@@ -123,6 +123,17 @@ const VerbosityEnum = z.enum(["low", "medium", "high"]);
123
123
  const ModelSchema = z.string().min(1);
124
124
  const MaxTokensSchema = z.number().int().positive();
125
125
  const TemperatureSchema = z.number().min(0).max(2).nullable();
126
+ // Named, code-resolved logit-bias preset a profile may opt into. The value is a
127
+ // preset *name*, not an inline token→bias map, so the workspace config stays
128
+ // small. This is profile-identity metadata, not inheritable config: the resolver
129
+ // strips it from the deep-merge and re-attaches it from the winning profile (see
130
+ // `profileConfigFragment` / `resolveCallSiteConfig`), and `RetryProvider`
131
+ // resolves it to a `logit_bias` map at request time, forwarded only on the
132
+ // Fireworks (OpenAI-compatible) path. Keep these literals in sync with the
133
+ // presets handled by `resolveLogitBiasPreset` in
134
+ // `providers/inference/logit-bias.ts` (kept separate to avoid a schema →
135
+ // provider import cycle).
136
+ const LogitBiasPresetSchema = z.enum(["suppress-cjk"]);
126
137
 
127
138
  // ---------------------------------------------------------------------------
128
139
  // Thinking & ContextWindow
@@ -315,6 +326,11 @@ export const LLMConfigBase = z.object({
315
326
  thinking: ThinkingSchema.default(ThinkingSchema.parse({})),
316
327
  contextWindow: ContextWindowSchema.default(ContextWindowSchema.parse({})),
317
328
  openrouter: OpenRouterSchema.default(OpenRouterSchema.parse({})),
329
+ // Not deep-merged like the other fields: `resolveCallSiteConfig` sets this
330
+ // from the single highest-precedence profile that won resolution (see
331
+ // `profileConfigFragment`, which strips it from the merge), so a preset
332
+ // can't bleed from a lower-precedence profile into one that didn't opt in.
333
+ logitBias: LogitBiasPresetSchema.optional(),
318
334
  });
319
335
  export type LLMConfigBase = z.infer<typeof LLMConfigBase>;
320
336
 
@@ -335,6 +351,7 @@ const LLMConfigFragment = z.object({
335
351
  thinking: ThinkingFragmentSchema.optional(),
336
352
  contextWindow: ContextWindowDeepPartialSchema.optional(),
337
353
  openrouter: OpenRouterDeepPartialSchema.optional(),
354
+ logitBias: LogitBiasPresetSchema.optional(),
338
355
  });
339
356
  type LLMConfigFragment = z.infer<typeof LLMConfigFragment>;
340
357
 
@@ -74,6 +74,24 @@ const MANAGED_PROFILE_TEMPLATES: Record<string, ManagedProfileTemplate> = {
74
74
  thinking: { enabled: false, streamThinking: false },
75
75
  contextWindow: { maxInputTokens: DEFAULT_CONTEXT_WINDOW_MAX_INPUT_TOKENS },
76
76
  },
77
+ // Open-weight economy option: Kimi K2.6 served by Fireworks via managed
78
+ // platform inference. Carries the `suppress-cjk` logit-bias preset to
79
+ // discourage the model from spontaneously emitting Chinese in English
80
+ // output; the preset is profile-scoped and only forwarded on the Fireworks
81
+ // path (see `providers/inference/logit-bias.ts`).
82
+ "balanced-economy": {
83
+ intent: "balanced",
84
+ provider: "fireworks",
85
+ connectionName: "fireworks-managed",
86
+ source: "managed",
87
+ label: "Balanced Economy",
88
+ description: "Strong open model (Kimi K2.6) at a lower price point",
89
+ maxTokens: 16000,
90
+ effort: "high",
91
+ thinking: { enabled: true, streamThinking: true },
92
+ contextWindow: { maxInputTokens: DEFAULT_CONTEXT_WINDOW_MAX_INPUT_TOKENS },
93
+ logitBias: "suppress-cjk",
94
+ },
77
95
  };
78
96
 
79
97
  /**
@@ -0,0 +1,493 @@
1
+ /**
2
+ * Token IDs of single-character CJK tokens in the Kimi K2 tokenizer
3
+ * (vocab size 163840), used by the `suppress-cjk` logit-bias preset to
4
+ * discourage the model from spontaneously emitting Chinese/Japanese/Korean in
5
+ * otherwise-English output (see `logit-bias.ts`).
6
+ *
7
+ * GENERATED — do not edit by hand. Derivation:
8
+ * - tokenizer: `moonshotai/Kimi-K2-Instruct` (token IDs are identical across
9
+ * the K2 / K2.5 / K2.6 / K2-Thinking builds — only the `<think>` reserved
10
+ * tokens differ — so this list applies to `kimi-k2p6` served by Fireworks).
11
+ * - a token is included when `decode([id])` is exactly ONE codepoint matching
12
+ * the CJK ranges: kana, Hangul (syllables + jamo), Han ideographs
13
+ * (incl. ext-A/B), CJK punctuation/symbols, and fullwidth/halfwidth forms.
14
+ * - single-character tokens (not multi-char word tokens) are biased because
15
+ * they cover the English→CJK *entry* points where a soft negative bias
16
+ * bites, while keeping the map small (~5313 entries vs ~70k for all
17
+ * CJK tokens) so per-request payload/latency stays negligible.
18
+ *
19
+ * Count: 5313.
20
+ */
21
+ export const KIMI_CJK_SINGLE_CHAR_TOKEN_IDS: readonly number[] = [
22
+ 269, 292, 330, 331, 343, 349, 363, 371, 375, 380, 423, 433, 435, 439, 441,
23
+ 444, 463, 474, 475, 481, 488, 491, 497, 501, 502, 508, 518, 532, 533, 549,
24
+ 550, 552, 557, 561, 564, 570, 572, 576, 582, 583, 592, 595, 598, 612, 613,
25
+ 614, 615, 616, 622, 624, 627, 628, 633, 640, 653, 654, 656, 660, 662, 664,
26
+ 668, 671, 679, 684, 685, 693, 696, 697, 706, 707, 716, 717, 722, 724, 729,
27
+ 734, 742, 744, 750, 752, 755, 756, 760, 761, 762, 765, 768, 772, 774, 775,
28
+ 776, 778, 779, 783, 784, 785, 786, 788, 797, 800, 801, 804, 805, 812, 813,
29
+ 815, 829, 833, 835, 836, 839, 845, 846, 847, 848, 851, 853, 854, 855, 858,
30
+ 861, 862, 863, 865, 871, 882, 883, 885, 892, 894, 895, 905, 908, 910, 912,
31
+ 917, 921, 929, 931, 935, 938, 939, 941, 947, 951, 952, 953, 963, 965, 967,
32
+ 968, 972, 975, 976, 978, 980, 989, 995, 999, 1006, 1009, 1011, 1014, 1015,
33
+ 1016, 1029, 1035, 1037, 1044, 1045, 1047, 1059, 1060, 1061, 1062, 1066, 1067,
34
+ 1068, 1071, 1072, 1079, 1081, 1084, 1087, 1089, 1090, 1091, 1097, 1102, 1104,
35
+ 1108, 1111, 1112, 1116, 1117, 1119, 1120, 1126, 1132, 1136, 1138, 1142, 1143,
36
+ 1147, 1156, 1158, 1162, 1163, 1164, 1165, 1167, 1170, 1173, 1175, 1176, 1180,
37
+ 1182, 1184, 1185, 1188, 1196, 1201, 1211, 1218, 1221, 1223, 1226, 1231, 1232,
38
+ 1233, 1235, 1237, 1240, 1243, 1244, 1246, 1249, 1250, 1257, 1259, 1262, 1266,
39
+ 1269, 1270, 1275, 1277, 1279, 1287, 1290, 1295, 1297, 1299, 1301, 1310, 1317,
40
+ 1320, 1324, 1325, 1326, 1327, 1330, 1331, 1337, 1340, 1345, 1348, 1354, 1355,
41
+ 1357, 1359, 1366, 1367, 1369, 1371, 1372, 1374, 1375, 1376, 1382, 1386, 1388,
42
+ 1391, 1392, 1394, 1395, 1400, 1403, 1404, 1408, 1410, 1411, 1416, 1418, 1422,
43
+ 1423, 1426, 1427, 1431, 1433, 1436, 1440, 1442, 1448, 1451, 1455, 1458, 1464,
44
+ 1469, 1471, 1472, 1473, 1475, 1477, 1478, 1480, 1482, 1490, 1496, 1502, 1504,
45
+ 1508, 1510, 1513, 1514, 1515, 1518, 1519, 1520, 1524, 1528, 1531, 1535, 1536,
46
+ 1537, 1538, 1540, 1542, 1548, 1549, 1552, 1553, 1554, 1555, 1556, 1560, 1561,
47
+ 1566, 1567, 1578, 1582, 1583, 1585, 1588, 1593, 1594, 1597, 1598, 1600, 1601,
48
+ 1607, 1613, 1615, 1617, 1620, 1621, 1623, 1624, 1625, 1630, 1637, 1640, 1645,
49
+ 1655, 1657, 1658, 1661, 1664, 1667, 1669, 1673, 1676, 1678, 1687, 1690, 1692,
50
+ 1693, 1697, 1702, 1703, 1708, 1711, 1713, 1714, 1722, 1723, 1728, 1729, 1733,
51
+ 1738, 1739, 1742, 1746, 1750, 1751, 1755, 1759, 1760, 1767, 1770, 1774, 1775,
52
+ 1779, 1784, 1790, 1792, 1793, 1794, 1795, 1800, 1806, 1809, 1811, 1816, 1822,
53
+ 1823, 1831, 1832, 1834, 1836, 1841, 1842, 1845, 1852, 1853, 1855, 1856, 1860,
54
+ 1864, 1866, 1869, 1870, 1876, 1881, 1882, 1886, 1894, 1898, 1901, 1902, 1904,
55
+ 1905, 1907, 1908, 1918, 1920, 1923, 1926, 1930, 1933, 1935, 1939, 1940, 1944,
56
+ 1947, 1950, 1957, 1958, 1964, 1967, 1970, 1978, 1979, 1981, 1983, 1984, 1986,
57
+ 1987, 1989, 1991, 1995, 1997, 2004, 2012, 2014, 2017, 2022, 2024, 2027, 2030,
58
+ 2031, 2036, 2038, 2039, 2042, 2043, 2044, 2048, 2053, 2054, 2056, 2060, 2062,
59
+ 2066, 2068, 2071, 2074, 2076, 2081, 2082, 2087, 2096, 2099, 2100, 2107, 2115,
60
+ 2117, 2119, 2124, 2126, 2127, 2130, 2131, 2134, 2138, 2143, 2144, 2146, 2147,
61
+ 2149, 2152, 2155, 2159, 2160, 2161, 2169, 2170, 2175, 2178, 2182, 2183, 2184,
62
+ 2186, 2193, 2197, 2198, 2199, 2207, 2210, 2211, 2214, 2220, 2226, 2227, 2235,
63
+ 2239, 2241, 2246, 2247, 2250, 2253, 2260, 2261, 2262, 2263, 2279, 2283, 2288,
64
+ 2290, 2304, 2312, 2316, 2323, 2324, 2325, 2331, 2333, 2337, 2338, 2339, 2341,
65
+ 2342, 2344, 2345, 2352, 2358, 2364, 2371, 2378, 2381, 2382, 2383, 2386, 2387,
66
+ 2392, 2398, 2400, 2402, 2405, 2408, 2410, 2411, 2412, 2413, 2417, 2430, 2433,
67
+ 2439, 2440, 2443, 2452, 2459, 2461, 2465, 2473, 2484, 2485, 2488, 2489, 2492,
68
+ 2495, 2499, 2500, 2505, 2517, 2518, 2528, 2532, 2535, 2536, 2538, 2539, 2540,
69
+ 2543, 2547, 2552, 2553, 2555, 2564, 2584, 2592, 2596, 2599, 2603, 2604, 2605,
70
+ 2625, 2626, 2630, 2635, 2642, 2647, 2651, 2655, 2660, 2661, 2662, 2664, 2670,
71
+ 2678, 2681, 2682, 2684, 2685, 2689, 2693, 2702, 2709, 2712, 2720, 2722, 2727,
72
+ 2733, 2735, 2736, 2740, 2748, 2755, 2756, 2766, 2768, 2769, 2773, 2774, 2783,
73
+ 2784, 2793, 2799, 2801, 2802, 2803, 2808, 2809, 2815, 2820, 2824, 2829, 2830,
74
+ 2832, 2842, 2853, 2854, 2855, 2860, 2863, 2874, 2875, 2883, 2884, 2886, 2888,
75
+ 2892, 2893, 2894, 2907, 2911, 2912, 2920, 2924, 2930, 2931, 2936, 2937, 2939,
76
+ 2942, 2952, 2961, 2962, 2968, 2969, 2977, 2982, 2984, 2989, 2991, 2992, 3005,
77
+ 3008, 3010, 3038, 3044, 3045, 3047, 3057, 3059, 3064, 3070, 3079, 3080, 3084,
78
+ 3085, 3088, 3092, 3093, 3094, 3096, 3110, 3132, 3136, 3137, 3138, 3144, 3151,
79
+ 3156, 3160, 3164, 3166, 3168, 3172, 3175, 3179, 3182, 3193, 3195, 3198, 3209,
80
+ 3211, 3212, 3213, 3215, 3221, 3223, 3224, 3225, 3228, 3246, 3249, 3252, 3259,
81
+ 3260, 3273, 3279, 3291, 3299, 3305, 3309, 3310, 3312, 3314, 3321, 3325, 3328,
82
+ 3330, 3337, 3339, 3343, 3344, 3353, 3356, 3357, 3359, 3360, 3362, 3364, 3370,
83
+ 3377, 3380, 3382, 3386, 3390, 3393, 3396, 3398, 3399, 3400, 3409, 3413, 3415,
84
+ 3421, 3424, 3425, 3435, 3437, 3441, 3444, 3448, 3454, 3458, 3460, 3472, 3475,
85
+ 3487, 3496, 3503, 3505, 3507, 3518, 3525, 3528, 3532, 3535, 3542, 3546, 3547,
86
+ 3548, 3556, 3565, 3576, 3579, 3580, 3581, 3585, 3586, 3590, 3597, 3598, 3605,
87
+ 3612, 3615, 3624, 3631, 3644, 3649, 3651, 3656, 3666, 3674, 3689, 3690, 3693,
88
+ 3702, 3705, 3716, 3717, 3718, 3726, 3727, 3728, 3734, 3740, 3741, 3754, 3761,
89
+ 3762, 3768, 3770, 3773, 3781, 3795, 3799, 3808, 3812, 3820, 3821, 3825, 3838,
90
+ 3839, 3851, 3856, 3863, 3865, 3866, 3870, 3872, 3874, 3875, 3877, 3892, 3897,
91
+ 3899, 3904, 3928, 3929, 3931, 3933, 3936, 3937, 3942, 3944, 3947, 3950, 3957,
92
+ 3958, 3960, 3961, 3963, 3968, 3978, 3994, 4008, 4012, 4014, 4034, 4036, 4047,
93
+ 4057, 4061, 4062, 4064, 4067, 4073, 4074, 4076, 4077, 4080, 4085, 4091, 4092,
94
+ 4097, 4099, 4100, 4113, 4121, 4125, 4129, 4134, 4136, 4142, 4144, 4148, 4150,
95
+ 4152, 4157, 4158, 4160, 4172, 4176, 4178, 4185, 4189, 4196, 4197, 4198, 4199,
96
+ 4209, 4220, 4222, 4225, 4252, 4262, 4269, 4278, 4280, 4299, 4304, 4308, 4309,
97
+ 4316, 4322, 4330, 4335, 4336, 4339, 4340, 4345, 4350, 4360, 4361, 4362, 4373,
98
+ 4379, 4383, 4402, 4405, 4406, 4410, 4426, 4428, 4433, 4443, 4463, 4482, 4490,
99
+ 4491, 4497, 4499, 4507, 4512, 4513, 4517, 4519, 4520, 4530, 4537, 4540, 4550,
100
+ 4557, 4560, 4572, 4575, 4578, 4586, 4593, 4601, 4614, 4629, 4633, 4634, 4636,
101
+ 4640, 4644, 4650, 4653, 4655, 4656, 4663, 4669, 4671, 4672, 4677, 4679, 4683,
102
+ 4686, 4690, 4692, 4693, 4694, 4697, 4705, 4708, 4716, 4732, 4742, 4743, 4745,
103
+ 4753, 4754, 4757, 4758, 4767, 4779, 4785, 4786, 4801, 4802, 4808, 4815, 4818,
104
+ 4822, 4824, 4834, 4836, 4838, 4841, 4844, 4845, 4847, 4851, 4856, 4871, 4881,
105
+ 4883, 4888, 4905, 4907, 4910, 4915, 4917, 4919, 4929, 4931, 4938, 4940, 4947,
106
+ 4956, 4958, 4959, 4979, 4984, 4987, 5010, 5013, 5019, 5031, 5035, 5036, 5043,
107
+ 5045, 5051, 5064, 5078, 5084, 5086, 5093, 5095, 5127, 5132, 5143, 5146, 5151,
108
+ 5153, 5165, 5171, 5172, 5174, 5176, 5179, 5180, 5188, 5193, 5197, 5204, 5215,
109
+ 5222, 5223, 5229, 5236, 5238, 5239, 5240, 5244, 5245, 5248, 5252, 5257, 5260,
110
+ 5270, 5285, 5297, 5301, 5303, 5304, 5307, 5313, 5325, 5334, 5339, 5343, 5352,
111
+ 5361, 5378, 5381, 5385, 5400, 5414, 5418, 5420, 5428, 5431, 5433, 5442, 5443,
112
+ 5448, 5453, 5471, 5474, 5475, 5491, 5502, 5509, 5513, 5515, 5519, 5522, 5523,
113
+ 5530, 5538, 5540, 5543, 5546, 5551, 5568, 5571, 5575, 5583, 5588, 5597, 5602,
114
+ 5603, 5608, 5612, 5613, 5621, 5630, 5648, 5662, 5664, 5675, 5678, 5682, 5683,
115
+ 5686, 5691, 5711, 5718, 5722, 5732, 5734, 5748, 5750, 5751, 5754, 5755, 5758,
116
+ 5759, 5773, 5789, 5790, 5792, 5813, 5851, 5861, 5877, 5880, 5882, 5892, 5897,
117
+ 5901, 5902, 5934, 5940, 5949, 5951, 5956, 5957, 5958, 5966, 5969, 5973, 5988,
118
+ 5991, 5995, 5998, 6009, 6029, 6042, 6046, 6049, 6056, 6060, 6065, 6069, 6078,
119
+ 6091, 6096, 6097, 6098, 6099, 6106, 6115, 6119, 6137, 6139, 6143, 6145, 6153,
120
+ 6168, 6181, 6190, 6201, 6202, 6203, 6204, 6220, 6222, 6230, 6255, 6258, 6271,
121
+ 6272, 6273, 6279, 6281, 6290, 6292, 6294, 6319, 6321, 6324, 6342, 6346, 6347,
122
+ 6353, 6361, 6373, 6401, 6404, 6413, 6414, 6427, 6428, 6447, 6452, 6471, 6477,
123
+ 6492, 6495, 6502, 6503, 6510, 6511, 6515, 6519, 6522, 6530, 6534, 6535, 6544,
124
+ 6547, 6556, 6559, 6565, 6596, 6603, 6605, 6607, 6609, 6615, 6619, 6620, 6625,
125
+ 6640, 6647, 6650, 6652, 6669, 6673, 6674, 6680, 6701, 6704, 6707, 6717, 6729,
126
+ 6752, 6760, 6769, 6779, 6790, 6797, 6800, 6808, 6812, 6815, 6827, 6830, 6833,
127
+ 6834, 6835, 6836, 6837, 6853, 6858, 6860, 6861, 6862, 6867, 6868, 6878, 6879,
128
+ 6880, 6884, 6889, 6899, 6923, 6927, 6933, 6935, 6940, 6941, 6944, 6945, 6954,
129
+ 6970, 6976, 6979, 6981, 7015, 7016, 7022, 7023, 7031, 7036, 7038, 7039, 7043,
130
+ 7054, 7059, 7061, 7085, 7089, 7090, 7112, 7129, 7132, 7133, 7134, 7141, 7168,
131
+ 7175, 7177, 7178, 7184, 7187, 7188, 7190, 7215, 7219, 7228, 7241, 7249, 7261,
132
+ 7270, 7281, 7283, 7286, 7291, 7295, 7306, 7310, 7315, 7329, 7336, 7339, 7341,
133
+ 7354, 7373, 7376, 7377, 7380, 7398, 7407, 7415, 7418, 7422, 7427, 7436, 7441,
134
+ 7442, 7447, 7456, 7460, 7470, 7477, 7499, 7501, 7502, 7508, 7512, 7522, 7528,
135
+ 7548, 7556, 7560, 7572, 7587, 7592, 7593, 7596, 7599, 7600, 7607, 7608, 7613,
136
+ 7651, 7677, 7688, 7693, 7704, 7726, 7731, 7756, 7765, 7784, 7793, 7807, 7813,
137
+ 7821, 7844, 7845, 7846, 7864, 7891, 7892, 7906, 7912, 7913, 7914, 7925, 7926,
138
+ 7929, 7941, 7967, 7969, 7984, 7988, 7993, 8003, 8015, 8019, 8024, 8033, 8050,
139
+ 8070, 8073, 8111, 8114, 8117, 8125, 8133, 8141, 8143, 8151, 8152, 8158, 8166,
140
+ 8188, 8197, 8210, 8211, 8215, 8219, 8236, 8237, 8241, 8266, 8277, 8278, 8280,
141
+ 8283, 8312, 8317, 8321, 8327, 8329, 8336, 8343, 8352, 8353, 8358, 8359, 8364,
142
+ 8383, 8387, 8399, 8402, 8408, 8410, 8426, 8429, 8435, 8437, 8449, 8451, 8456,
143
+ 8468, 8469, 8471, 8483, 8498, 8519, 8520, 8546, 8552, 8568, 8570, 8590, 8602,
144
+ 8612, 8614, 8615, 8623, 8624, 8625, 8640, 8653, 8659, 8660, 8679, 8685, 8696,
145
+ 8697, 8700, 8706, 8715, 8717, 8719, 8752, 8758, 8762, 8765, 8785, 8787, 8798,
146
+ 8799, 8803, 8810, 8831, 8836, 8846, 8851, 8857, 8871, 8872, 8874, 8887, 8894,
147
+ 8902, 8917, 8918, 8926, 8929, 8935, 8940, 8946, 8973, 8980, 8982, 8986, 9015,
148
+ 9016, 9019, 9021, 9028, 9035, 9051, 9054, 9058, 9063, 9067, 9088, 9092, 9095,
149
+ 9102, 9131, 9145, 9161, 9169, 9182, 9195, 9201, 9204, 9209, 9212, 9219, 9220,
150
+ 9223, 9229, 9252, 9254, 9265, 9277, 9286, 9300, 9301, 9303, 9329, 9331, 9333,
151
+ 9349, 9358, 9367, 9375, 9391, 9393, 9404, 9415, 9420, 9428, 9431, 9432, 9435,
152
+ 9437, 9445, 9470, 9482, 9489, 9490, 9491, 9492, 9501, 9520, 9534, 9558, 9562,
153
+ 9607, 9616, 9633, 9636, 9638, 9660, 9677, 9688, 9690, 9693, 9697, 9704, 9706,
154
+ 9711, 9714, 9716, 9718, 9720, 9725, 9755, 9774, 9786, 9790, 9792, 9798, 9811,
155
+ 9832, 9833, 9834, 9847, 9863, 9865, 9871, 9872, 9892, 9949, 9953, 9954, 9968,
156
+ 9987, 9992, 9996, 10000, 10010, 10029, 10032, 10044, 10051, 10052, 10053,
157
+ 10055, 10068, 10077, 10078, 10099, 10104, 10105, 10106, 10109, 10120, 10124,
158
+ 10125, 10142, 10143, 10149, 10153, 10160, 10173, 10176, 10177, 10179, 10188,
159
+ 10230, 10234, 10241, 10244, 10258, 10285, 10291, 10304, 10328, 10344, 10345,
160
+ 10377, 10389, 10395, 10401, 10402, 10408, 10409, 10416, 10422, 10438, 10450,
161
+ 10451, 10465, 10467, 10478, 10495, 10540, 10541, 10544, 10549, 10590, 10602,
162
+ 10603, 10617, 10618, 10626, 10647, 10652, 10690, 10691, 10698, 10707, 10708,
163
+ 10715, 10724, 10749, 10763, 10788, 10789, 10791, 10814, 10826, 10838, 10842,
164
+ 10843, 10855, 10868, 10897, 10898, 10903, 10916, 10917, 10955, 10957, 10960,
165
+ 10971, 10992, 10999, 11005, 11030, 11033, 11040, 11044, 11057, 11089, 11095,
166
+ 11096, 11122, 11148, 11169, 11171, 11175, 11189, 11195, 11204, 11207, 11223,
167
+ 11229, 11233, 11234, 11235, 11261, 11280, 11284, 11307, 11310, 11317, 11324,
168
+ 11325, 11368, 11388, 11391, 11393, 11415, 11453, 11473, 11482, 11495, 11497,
169
+ 11499, 11515, 11525, 11529, 11561, 11573, 11598, 11608, 11609, 11621, 11628,
170
+ 11630, 11636, 11641, 11652, 11656, 11665, 11668, 11691, 11694, 11709, 11713,
171
+ 11725, 11730, 11731, 11759, 11780, 11787, 11789, 11791, 11812, 11813, 11827,
172
+ 11830, 11837, 11839, 11846, 11853, 11861, 11876, 11883, 11895, 11903, 11921,
173
+ 11938, 11944, 11988, 12017, 12057, 12068, 12073, 12074, 12083, 12090, 12091,
174
+ 12095, 12100, 12106, 12130, 12134, 12148, 12177, 12178, 12190, 12196, 12198,
175
+ 12205, 12206, 12211, 12236, 12239, 12254, 12266, 12286, 12290, 12298, 12314,
176
+ 12318, 12320, 12363, 12375, 12386, 12399, 12401, 12403, 12418, 12433, 12446,
177
+ 12454, 12463, 12497, 12525, 12526, 12527, 12528, 12534, 12537, 12559, 12565,
178
+ 12573, 12580, 12600, 12609, 12611, 12612, 12617, 12630, 12634, 12646, 12655,
179
+ 12657, 12659, 12700, 12702, 12705, 12709, 12711, 12724, 12816, 12830, 12852,
180
+ 12866, 12869, 12873, 12876, 12911, 12926, 12964, 12965, 12969, 12975, 12979,
181
+ 13011, 13035, 13039, 13045, 13051, 13055, 13061, 13073, 13079, 13080, 13091,
182
+ 13097, 13100, 13104, 13106, 13110, 13125, 13144, 13145, 13148, 13155, 13173,
183
+ 13181, 13188, 13196, 13221, 13231, 13242, 13253, 13273, 13277, 13287, 13309,
184
+ 13314, 13322, 13326, 13341, 13350, 13368, 13405, 13433, 13452, 13479, 13486,
185
+ 13487, 13495, 13512, 13522, 13553, 13568, 13574, 13592, 13603, 13642, 13655,
186
+ 13662, 13669, 13685, 13690, 13702, 13708, 13715, 13718, 13739, 13754, 13763,
187
+ 13779, 13786, 13805, 13813, 13833, 13843, 13860, 13865, 13870, 13894, 13895,
188
+ 13899, 13906, 13925, 13928, 13934, 13960, 13989, 13990, 14003, 14006, 14022,
189
+ 14027, 14051, 14063, 14065, 14081, 14088, 14102, 14105, 14108, 14117, 14124,
190
+ 14126, 14172, 14173, 14174, 14178, 14183, 14187, 14198, 14200, 14224, 14228,
191
+ 14272, 14288, 14289, 14292, 14297, 14321, 14329, 14336, 14342, 14369, 14390,
192
+ 14405, 14408, 14412, 14440, 14445, 14465, 14477, 14479, 14491, 14493, 14515,
193
+ 14526, 14535, 14542, 14553, 14562, 14572, 14599, 14632, 14659, 14680, 14720,
194
+ 14765, 14769, 14794, 14810, 14832, 14835, 14838, 14846, 14869, 14902, 14921,
195
+ 14932, 14948, 14962, 14970, 15017, 15051, 15070, 15071, 15077, 15094, 15110,
196
+ 15117, 15125, 15129, 15130, 15141, 15146, 15171, 15185, 15187, 15192, 15204,
197
+ 15209, 15229, 15232, 15259, 15269, 15273, 15276, 15280, 15314, 15315, 15322,
198
+ 15323, 15324, 15328, 15334, 15337, 15338, 15345, 15361, 15420, 15435, 15439,
199
+ 15472, 15476, 15477, 15479, 15501, 15505, 15508, 15527, 15556, 15558, 15573,
200
+ 15579, 15583, 15585, 15593, 15596, 15612, 15624, 15628, 15634, 15647, 15648,
201
+ 15667, 15684, 15717, 15736, 15746, 15783, 15798, 15803, 15804, 15817, 15823,
202
+ 15886, 15893, 15918, 15971, 15976, 15986, 15987, 15988, 16013, 16041, 16050,
203
+ 16064, 16071, 16096, 16102, 16104, 16114, 16121, 16128, 16140, 16153, 16166,
204
+ 16168, 16204, 16205, 16221, 16255, 16317, 16345, 16382, 16394, 16405, 16409,
205
+ 16411, 16416, 16441, 16444, 16466, 16474, 16478, 16491, 16522, 16532, 16537,
206
+ 16553, 16556, 16559, 16593, 16601, 16628, 16632, 16647, 16648, 16651, 16658,
207
+ 16659, 16664, 16665, 16689, 16704, 16710, 16732, 16768, 16772, 16775, 16777,
208
+ 16787, 16789, 16797, 16799, 16800, 16813, 16846, 16874, 16906, 16910, 16911,
209
+ 16922, 16943, 16948, 16949, 16951, 16961, 16971, 16981, 16985, 17009, 17013,
210
+ 17032, 17049, 17067, 17079, 17123, 17127, 17140, 17207, 17234, 17258, 17290,
211
+ 17297, 17380, 17383, 17404, 17467, 17482, 17495, 17516, 17519, 17523, 17535,
212
+ 17556, 17565, 17572, 17575, 17585, 17623, 17654, 17656, 17672, 17676, 17714,
213
+ 17733, 17740, 17741, 17747, 17808, 17820, 17858, 17873, 17891, 17892, 17894,
214
+ 17900, 17913, 17938, 17948, 17968, 17980, 17990, 18020, 18037, 18051, 18115,
215
+ 18117, 18125, 18146, 18149, 18155, 18174, 18177, 18186, 18188, 18198, 18255,
216
+ 18256, 18267, 18296, 18298, 18305, 18321, 18352, 18385, 18398, 18407, 18413,
217
+ 18416, 18420, 18422, 18437, 18449, 18492, 18497, 18505, 18545, 18557, 18579,
218
+ 18589, 18622, 18624, 18627, 18642, 18693, 18694, 18712, 18750, 18757, 18759,
219
+ 18776, 18777, 18790, 18803, 18817, 18841, 18853, 18864, 18898, 18901, 18954,
220
+ 18960, 18973, 18977, 18980, 18995, 19000, 19006, 19037, 19060, 19125, 19147,
221
+ 19209, 19215, 19264, 19301, 19303, 19317, 19415, 19420, 19424, 19479, 19506,
222
+ 19554, 19561, 19571, 19589, 19602, 19604, 19641, 19664, 19670, 19703, 19705,
223
+ 19717, 19722, 19730, 19736, 19772, 19778, 19825, 19853, 19863, 19869, 19909,
224
+ 20001, 20072, 20074, 20100, 20123, 20125, 20131, 20136, 20155, 20156, 20180,
225
+ 20194, 20197, 20227, 20243, 20245, 20249, 20296, 20315, 20323, 20353, 20358,
226
+ 20360, 20377, 20382, 20409, 20416, 20426, 20447, 20492, 20494, 20503, 20519,
227
+ 20523, 20540, 20578, 20590, 20597, 20600, 20624, 20626, 20689, 20692, 20765,
228
+ 20797, 20820, 20849, 20859, 20860, 20883, 20885, 20891, 20945, 20947, 20952,
229
+ 21002, 21005, 21037, 21075, 21176, 21177, 21218, 21227, 21247, 21276, 21283,
230
+ 21311, 21344, 21352, 21382, 21394, 21397, 21449, 21470, 21477, 21481, 21504,
231
+ 21533, 21552, 21553, 21564, 21616, 21636, 21721, 21726, 21727, 21735, 21739,
232
+ 21768, 21844, 21846, 21891, 21902, 21947, 21977, 21983, 21994, 21995, 21999,
233
+ 22002, 22016, 22034, 22038, 22108, 22161, 22174, 22179, 22202, 22209, 22230,
234
+ 22236, 22287, 22315, 22322, 22334, 22375, 22391, 22403, 22434, 22438, 22443,
235
+ 22455, 22458, 22467, 22500, 22524, 22531, 22550, 22590, 22591, 22596, 22598,
236
+ 22622, 22628, 22635, 22647, 22670, 22678, 22682, 22685, 22698, 22707, 22730,
237
+ 22740, 22753, 22794, 22822, 22842, 22862, 22878, 22883, 22914, 22924, 22944,
238
+ 22971, 22983, 23000, 23066, 23073, 23093, 23097, 23102, 23116, 23123, 23182,
239
+ 23190, 23215, 23303, 23325, 23368, 23373, 23403, 23410, 23420, 23435, 23445,
240
+ 23457, 23466, 23517, 23525, 23607, 23663, 23668, 23702, 23722, 23744, 23812,
241
+ 23828, 23844, 23856, 23894, 23900, 23932, 23938, 23946, 23955, 23956, 23988,
242
+ 24083, 24090, 24120, 24169, 24171, 24189, 24192, 24197, 24199, 24204, 24263,
243
+ 24268, 24276, 24362, 24383, 24466, 24474, 24485, 24507, 24510, 24557, 24567,
244
+ 24707, 24723, 24747, 24762, 24781, 24791, 24826, 24834, 24847, 24858, 24868,
245
+ 24870, 24901, 24926, 24975, 24985, 25017, 25027, 25036, 25053, 25055, 25060,
246
+ 25104, 25117, 25122, 25123, 25143, 25156, 25175, 25176, 25183, 25241, 25286,
247
+ 25308, 25346, 25361, 25376, 25393, 25402, 25413, 25458, 25478, 25481, 25505,
248
+ 25549, 25563, 25572, 25581, 25618, 25625, 25660, 25681, 25682, 25689, 25704,
249
+ 25722, 25734, 25738, 25755, 25781, 25782, 25783, 25847, 25857, 25866, 25875,
250
+ 25887, 25975, 25980, 26000, 26017, 26026, 26031, 26039, 26074, 26088, 26115,
251
+ 26121, 26143, 26150, 26155, 26169, 26189, 26190, 26199, 26240, 26310, 26319,
252
+ 26339, 26343, 26366, 26397, 26399, 26408, 26423, 26425, 26436, 26493, 26552,
253
+ 26567, 26568, 26569, 26581, 26609, 26671, 26675, 26703, 26720, 26736, 26745,
254
+ 26775, 26780, 26849, 26883, 26898, 26902, 26916, 26924, 26954, 26973, 26980,
255
+ 27000, 27025, 27027, 27035, 27072, 27080, 27110, 27114, 27127, 27140, 27145,
256
+ 27168, 27181, 27201, 27203, 27225, 27251, 27267, 27299, 27318, 27327, 27357,
257
+ 27369, 27374, 27424, 27484, 27503, 27549, 27569, 27570, 27617, 27647, 27652,
258
+ 27662, 27685, 27707, 27716, 27720, 27722, 27731, 27739, 27755, 27852, 27858,
259
+ 27868, 27884, 27917, 27924, 27927, 27999, 28012, 28016, 28048, 28091, 28116,
260
+ 28121, 28161, 28191, 28225, 28305, 28317, 28332, 28343, 28351, 28360, 28380,
261
+ 28417, 28429, 28434, 28456, 28539, 28558, 28593, 28602, 28631, 28653, 28665,
262
+ 28684, 28697, 28700, 28705, 28724, 28729, 28763, 28907, 28938, 28981, 28997,
263
+ 29007, 29014, 29072, 29083, 29092, 29099, 29112, 29194, 29208, 29250, 29256,
264
+ 29269, 29279, 29300, 29319, 29325, 29330, 29387, 29416, 29420, 29437, 29440,
265
+ 29504, 29519, 29529, 29614, 29618, 29628, 29634, 29671, 29672, 29678, 29681,
266
+ 29767, 29775, 29805, 29850, 29922, 29988, 29998, 30007, 30011, 30027, 30032,
267
+ 30039, 30050, 30068, 30090, 30097, 30104, 30117, 30120, 30125, 30130, 30147,
268
+ 30189, 30207, 30262, 30355, 30358, 30368, 30373, 30454, 30464, 30482, 30509,
269
+ 30554, 30643, 30650, 30662, 30678, 30706, 30711, 30716, 30719, 30752, 30757,
270
+ 30789, 30807, 30870, 30874, 30891, 30924, 30934, 30983, 30988, 30990, 31003,
271
+ 31027, 31050, 31058, 31073, 31091, 31110, 31127, 31130, 31192, 31194, 31200,
272
+ 31206, 31246, 31293, 31325, 31327, 31359, 31371, 31382, 31406, 31410, 31417,
273
+ 31428, 31445, 31474, 31492, 31499, 31533, 31538, 31552, 31565, 31577, 31659,
274
+ 31672, 31681, 31688, 31712, 31807, 31852, 31881, 31904, 31906, 31955, 31979,
275
+ 31985, 31992, 31998, 32000, 32009, 32045, 32071, 32075, 32090, 32170, 32225,
276
+ 32238, 32243, 32289, 32301, 32313, 32357, 32423, 32479, 32540, 32543, 32555,
277
+ 32573, 32606, 32643, 32656, 32660, 32700, 32715, 32729, 32789, 32790, 32796,
278
+ 32815, 32831, 32856, 32865, 32911, 32928, 32942, 32963, 32968, 32987, 33020,
279
+ 33055, 33056, 33058, 33103, 33138, 33164, 33167, 33174, 33185, 33212, 33224,
280
+ 33227, 33267, 33295, 33317, 33324, 33343, 33384, 33389, 33421, 33520, 33522,
281
+ 33532, 33591, 33638, 33662, 33666, 33673, 33797, 33816, 33849, 33874, 33902,
282
+ 33926, 34004, 34020, 34024, 34041, 34108, 34138, 34139, 34262, 34298, 34331,
283
+ 34378, 34422, 34495, 34597, 34658, 34682, 34713, 34716, 34734, 34778, 34787,
284
+ 34874, 34943, 34982, 35028, 35052, 35069, 35073, 35089, 35092, 35107, 35110,
285
+ 35120, 35126, 35142, 35157, 35212, 35215, 35267, 35390, 35402, 35403, 35444,
286
+ 35490, 35491, 35551, 35607, 35653, 35717, 35722, 35726, 35742, 35758, 35764,
287
+ 35785, 35787, 35841, 35870, 35910, 35923, 35937, 35966, 36023, 36033, 36053,
288
+ 36076, 36101, 36113, 36151, 36156, 36168, 36186, 36293, 36355, 36396, 36445,
289
+ 36486, 36501, 36508, 36509, 36520, 36526, 36537, 36552, 36555, 36558, 36601,
290
+ 36644, 36651, 36729, 36784, 36858, 36873, 36880, 36896, 36898, 36899, 36900,
291
+ 36903, 36923, 36927, 36931, 36955, 36966, 36992, 37018, 37025, 37064, 37096,
292
+ 37130, 37154, 37170, 37206, 37223, 37228, 37271, 37273, 37277, 37292, 37317,
293
+ 37365, 37386, 37388, 37435, 37492, 37501, 37629, 37653, 37678, 37703, 37722,
294
+ 37767, 37809, 37821, 37831, 37902, 37915, 37916, 37929, 37945, 37972, 37987,
295
+ 38004, 38013, 38046, 38086, 38136, 38155, 38226, 38299, 38310, 38322, 38338,
296
+ 38344, 38357, 38430, 38504, 38620, 38682, 38702, 38707, 38712, 38735, 38770,
297
+ 38796, 38834, 38836, 38904, 38906, 38935, 38957, 38961, 38993, 39118, 39189,
298
+ 39221, 39242, 39243, 39264, 39265, 39282, 39302, 39349, 39363, 39371, 39385,
299
+ 39486, 39488, 39503, 39508, 39513, 39540, 39614, 39671, 39693, 39742, 39749,
300
+ 39822, 39861, 39902, 39911, 39950, 39953, 39958, 39978, 40072, 40108, 40118,
301
+ 40131, 40229, 40239, 40258, 40322, 40403, 40407, 40432, 40543, 40555, 40583,
302
+ 40593, 40600, 40682, 40691, 40750, 40827, 40840, 40925, 40955, 41052, 41055,
303
+ 41064, 41087, 41101, 41123, 41128, 41133, 41162, 41163, 41192, 41198, 41267,
304
+ 41320, 41321, 41345, 41347, 41369, 41388, 41426, 41434, 41475, 41507, 41552,
305
+ 41554, 41578, 41581, 41643, 41706, 41710, 41737, 41755, 41765, 41802, 41853,
306
+ 41881, 41904, 41923, 41972, 41979, 41980, 41993, 42002, 42036, 42054, 42067,
307
+ 42094, 42101, 42110, 42125, 42171, 42264, 42288, 42299, 42310, 42323, 42361,
308
+ 42384, 42472, 42520, 42532, 42665, 42706, 42724, 42725, 42759, 42815, 43000,
309
+ 43002, 43005, 43036, 43042, 43227, 43260, 43300, 43315, 43330, 43365, 43402,
310
+ 43405, 43415, 43454, 43566, 43627, 43729, 43730, 43755, 43784, 43800, 43873,
311
+ 43887, 43913, 43955, 43962, 43977, 43981, 44009, 44041, 44042, 44056, 44105,
312
+ 44157, 44168, 44247, 44252, 44285, 44318, 44335, 44367, 44370, 44409, 44524,
313
+ 44525, 44539, 44584, 44608, 44610, 44699, 44760, 44781, 44801, 44926, 44930,
314
+ 44972, 45042, 45120, 45127, 45199, 45215, 45283, 45290, 45298, 45303, 45321,
315
+ 45325, 45348, 45360, 45456, 45585, 45586, 45619, 45664, 45688, 45711, 45712,
316
+ 45785, 45866, 45876, 45908, 45925, 45930, 46000, 46016, 46039, 46047, 46058,
317
+ 46071, 46113, 46194, 46231, 46244, 46343, 46376, 46476, 46537, 46553, 46564,
318
+ 46570, 46634, 46640, 46664, 46684, 46695, 46727, 46788, 46829, 46870, 46900,
319
+ 47026, 47027, 47094, 47156, 47158, 47229, 47238, 47319, 47391, 47475, 47493,
320
+ 47526, 47563, 47589, 47671, 47685, 47715, 47826, 47839, 47874, 47972, 47991,
321
+ 48077, 48137, 48201, 48224, 48244, 48248, 48293, 48304, 48305, 48313, 48314,
322
+ 48315, 48327, 48391, 48437, 48441, 48501, 48592, 48620, 48634, 48693, 48835,
323
+ 48857, 49003, 49099, 49102, 49128, 49165, 49194, 49201, 49211, 49265, 49385,
324
+ 49441, 49447, 49457, 49487, 49544, 49545, 49546, 49566, 49569, 49619, 49646,
325
+ 49686, 49702, 49747, 49755, 49764, 49789, 49792, 49802, 49865, 49886, 49915,
326
+ 49966, 50003, 50064, 50100, 50243, 50338, 50354, 50395, 50442, 50488, 50523,
327
+ 50538, 50558, 50597, 50646, 50660, 50676, 50719, 50806, 50875, 50903, 50997,
328
+ 51002, 51088, 51150, 51162, 51236, 51265, 51280, 51322, 51349, 51350, 51409,
329
+ 51544, 51598, 51603, 51653, 51666, 51672, 51675, 51738, 51841, 51842, 51911,
330
+ 51988, 52039, 52139, 52142, 52218, 52227, 52271, 52288, 52318, 52333, 52435,
331
+ 52496, 52560, 52607, 52655, 52678, 52696, 52722, 52779, 52783, 52800, 52864,
332
+ 52921, 52927, 53005, 53014, 53048, 53087, 53103, 53113, 53126, 53158, 53332,
333
+ 53366, 53382, 53425, 53438, 53458, 53525, 53722, 53733, 53773, 53800, 53810,
334
+ 53811, 53860, 53876, 53917, 53933, 53937, 53999, 54005, 54054, 54078, 54089,
335
+ 54158, 54185, 54229, 54370, 54421, 54428, 54455, 54459, 54470, 54559, 54572,
336
+ 54603, 54608, 54622, 54642, 54752, 54822, 54895, 54901, 54949, 55002, 55007,
337
+ 55025, 55033, 55115, 55158, 55159, 55181, 55191, 55244, 55326, 55336, 55410,
338
+ 55449, 55501, 55535, 55551, 55578, 55597, 55601, 55603, 55647, 55691, 55749,
339
+ 55755, 55800, 55834, 55838, 55846, 56014, 56027, 56034, 56053, 56110, 56145,
340
+ 56146, 56147, 56196, 56216, 56232, 56270, 56286, 56326, 56329, 56346, 56370,
341
+ 56387, 56544, 56583, 56591, 56595, 56647, 56746, 56747, 56784, 56799, 56829,
342
+ 56847, 56899, 56911, 56919, 56981, 57000, 57161, 57162, 57198, 57240, 57305,
343
+ 57309, 57359, 57400, 57455, 57458, 57629, 57632, 57751, 57767, 57840, 57986,
344
+ 58005, 58025, 58054, 58133, 58179, 58187, 58206, 58210, 58234, 58244, 58262,
345
+ 58340, 58355, 58404, 58444, 58558, 58750, 58762, 58790, 58840, 58857, 58888,
346
+ 58982, 58999, 59108, 59168, 59190, 59328, 59348, 59412, 59414, 59422, 59491,
347
+ 59621, 59712, 59760, 59773, 59787, 59791, 59884, 59918, 59985, 60017, 60127,
348
+ 60131, 60132, 60191, 60258, 60309, 60530, 60600, 60625, 60687, 60710, 60711,
349
+ 60732, 60738, 60763, 60784, 60837, 60877, 60883, 60931, 60938, 60961, 60965,
350
+ 61043, 61060, 61137, 61204, 61229, 61230, 61256, 61282, 61326, 61435, 61480,
351
+ 61557, 61680, 61736, 61785, 61807, 61827, 61835, 62017, 62022, 62106, 62155,
352
+ 62177, 62205, 62243, 62308, 62333, 62367, 62568, 62576, 62624, 62771, 62772,
353
+ 62817, 62869, 62957, 62970, 62991, 63011, 63070, 63075, 63127, 63141, 63214,
354
+ 63300, 63313, 63341, 63356, 63450, 63526, 63593, 63733, 63740, 63775, 63933,
355
+ 63967, 63996, 64024, 64025, 64030, 64090, 64164, 64174, 64232, 64243, 64259,
356
+ 64282, 64336, 64354, 64631, 64791, 65078, 65086, 65136, 65173, 65204, 65214,
357
+ 65260, 65274, 65353, 65362, 65376, 65440, 65453, 65454, 65551, 65571, 65585,
358
+ 65599, 65654, 65688, 65825, 65930, 65935, 65962, 66000, 66017, 66021, 66129,
359
+ 66194, 66241, 66306, 66358, 66395, 66554, 66628, 66674, 66691, 66775, 66831,
360
+ 66863, 66870, 66874, 66938, 66950, 67068, 67136, 67151, 67198, 67253, 67326,
361
+ 67338, 67342, 67425, 67426, 67488, 67489, 67516, 67768, 67792, 67853, 67902,
362
+ 67909, 67927, 67997, 68022, 68024, 68064, 68094, 68137, 68170, 68188, 68191,
363
+ 68193, 68202, 68323, 68335, 68348, 68376, 68389, 68442, 68461, 68528, 68530,
364
+ 68733, 68776, 68792, 68837, 68870, 68924, 69062, 69114, 69146, 69292, 69344,
365
+ 69359, 69370, 69439, 69511, 69606, 69632, 69640, 69655, 69669, 69682, 69708,
366
+ 69716, 69719, 69801, 70138, 70188, 70254, 70367, 70433, 70453, 70569, 70694,
367
+ 70727, 70801, 70856, 70896, 70928, 70952, 70965, 71080, 71117, 71211, 71295,
368
+ 71297, 71343, 71470, 71501, 71554, 71555, 71595, 71748, 71749, 71768, 71825,
369
+ 71879, 72007, 72023, 72038, 72198, 72199, 72221, 72247, 72266, 72281, 72301,
370
+ 72367, 72378, 72443, 72464, 72581, 72585, 72649, 72692, 72731, 72958, 72980,
371
+ 73035, 73040, 73126, 73168, 73220, 73268, 73359, 73475, 73487, 73491, 73513,
372
+ 73528, 73624, 73666, 73711, 73787, 73821, 73850, 73919, 73938, 74109, 74121,
373
+ 74207, 74241, 74331, 74369, 74391, 74419, 74484, 74495, 74538, 74658, 74674,
374
+ 74692, 74718, 74778, 74836, 74897, 74995, 75001, 75095, 75109, 75138, 75154,
375
+ 75155, 75261, 75265, 75291, 75460, 75500, 75687, 75748, 75787, 75794, 75800,
376
+ 75809, 75902, 75961, 76221, 76311, 76365, 76442, 76445, 76470, 76481, 76524,
377
+ 76533, 76561, 76586, 76673, 76744, 76770, 76772, 76821, 76908, 77056, 77083,
378
+ 77156, 77231, 77417, 77469, 77557, 77597, 77624, 77663, 77670, 77673, 77849,
379
+ 77864, 77904, 77958, 78029, 78060, 78151, 78188, 78266, 78345, 78369, 78506,
380
+ 78539, 78598, 78766, 78884, 78907, 78973, 79017, 79085, 79266, 79292, 79440,
381
+ 79455, 79507, 79540, 79611, 79695, 79787, 79815, 79818, 79819, 79873, 79960,
382
+ 80057, 80103, 80137, 80286, 80310, 80329, 80407, 80479, 80558, 80614, 80620,
383
+ 80670, 80671, 80845, 80885, 80928, 80983, 80993, 81064, 81070, 81080, 81081,
384
+ 81118, 81121, 81125, 81144, 81154, 81208, 81212, 81218, 81282, 81301, 81415,
385
+ 81460, 81501, 81502, 81503, 81514, 81604, 81795, 81801, 81872, 81952, 81955,
386
+ 81999, 82235, 82254, 82308, 82338, 82344, 82451, 82511, 82534, 82584, 82601,
387
+ 82657, 82688, 82717, 82731, 82880, 82931, 82952, 83045, 83183, 83235, 83238,
388
+ 83246, 83331, 83398, 83423, 83529, 83559, 83567, 83589, 83699, 83730, 83828,
389
+ 83868, 84052, 84079, 84095, 84171, 84268, 84316, 84319, 84369, 84512, 84653,
390
+ 84821, 85134, 85151, 85157, 85280, 85332, 85378, 85379, 85387, 85530, 85562,
391
+ 85623, 85644, 85679, 85708, 85753, 85880, 86001, 86044, 86076, 86313, 86345,
392
+ 86395, 86434, 86495, 86502, 86529, 86542, 86615, 86619, 86729, 86789, 86796,
393
+ 86844, 86938, 87054, 87057, 87093, 87097, 87111, 87193, 87379, 87451, 87594,
394
+ 87611, 87616, 87639, 87653, 87670, 87671, 87717, 87870, 87882, 87959, 87973,
395
+ 88158, 88226, 88259, 88338, 88436, 88493, 88577, 88599, 88675, 88741, 88763,
396
+ 88774, 88849, 88871, 88923, 88936, 89033, 89046, 89086, 89116, 89249, 89261,
397
+ 89286, 89330, 89385, 89469, 89530, 89612, 89643, 89686, 89795, 89978, 89996,
398
+ 90015, 90026, 90113, 90138, 90165, 90263, 90302, 90344, 90440, 90460, 90480,
399
+ 90518, 90626, 90750, 90756, 90834, 90866, 90878, 90909, 90938, 90942, 90992,
400
+ 91005, 91060, 91089, 91091, 91194, 91197, 91202, 91246, 91270, 91310, 91397,
401
+ 91507, 91566, 91635, 91675, 91726, 91792, 91801, 91855, 91894, 91898, 91978,
402
+ 92021, 92072, 92139, 92182, 92230, 92284, 92317, 92368, 92384, 92454, 92550,
403
+ 92564, 92644, 92765, 92781, 92850, 92874, 92881, 93168, 93245, 93264, 93364,
404
+ 93401, 93407, 93442, 93451, 93540, 93549, 93565, 93620, 93660, 93867, 94022,
405
+ 94033, 94039, 94176, 94274, 94324, 94466, 94483, 94515, 94726, 94729, 94757,
406
+ 94784, 94803, 94806, 94951, 94974, 94999, 95031, 95235, 95238, 95420, 95485,
407
+ 95493, 95537, 95586, 95652, 95695, 95781, 95809, 95880, 95888, 95965, 96025,
408
+ 96043, 96088, 96134, 96146, 96224, 96312, 96330, 96354, 96425, 96448, 96548,
409
+ 96617, 96682, 96735, 96737, 96963, 97055, 97058, 97074, 97151, 97154, 97166,
410
+ 97230, 97257, 97258, 97275, 97309, 97340, 97522, 97749, 97836, 97971, 98018,
411
+ 98084, 98103, 98367, 98467, 98475, 98513, 98531, 98653, 98703, 98761, 98766,
412
+ 98794, 98818, 99061, 99082, 99083, 99099, 99100, 99201, 99252, 99272, 99293,
413
+ 99312, 99336, 99354, 99423, 99446, 99497, 99500, 99525, 99711, 99766, 99767,
414
+ 99871, 99970, 100110, 100254, 100356, 100484, 100504, 100567, 100626, 100728,
415
+ 100770, 100842, 101023, 101032, 101039, 101104, 101125, 101140, 101158,
416
+ 101204, 101283, 101323, 101327, 101557, 101746, 101784, 101870, 101873,
417
+ 101930, 101948, 101960, 101989, 102218, 102258, 102291, 102313, 102342,
418
+ 102384, 102561, 102570, 102571, 102665, 102729, 102816, 102824, 102914,
419
+ 102969, 103043, 103129, 103144, 103257, 103278, 103303, 103425, 103547,
420
+ 103752, 103815, 104021, 104056, 104073, 104217, 104257, 104273, 104287,
421
+ 104390, 104482, 104645, 104677, 104822, 104927, 105059, 105123, 105172,
422
+ 105195, 105265, 105379, 105439, 105458, 105516, 105593, 105632, 105639,
423
+ 105657, 105686, 105825, 105866, 105870, 106047, 106101, 106120, 106373,
424
+ 106405, 106455, 106522, 106529, 106535, 106560, 106611, 106706, 106773,
425
+ 106919, 106931, 107063, 107094, 107101, 107200, 107265, 107272, 107341,
426
+ 107565, 107687, 107727, 107778, 107895, 108132, 108151, 108329, 108432,
427
+ 108520, 108699, 109004, 109067, 109146, 109214, 109248, 109314, 109340,
428
+ 109361, 109396, 109399, 109500, 109665, 109674, 109688, 109748, 109769,
429
+ 109778, 109807, 109921, 110064, 110111, 110206, 110298, 110355, 110400,
430
+ 110454, 110521, 110630, 110713, 110763, 110794, 110799, 110907, 110908,
431
+ 110969, 110988, 110996, 110999, 111031, 111061, 111064, 111157, 111177,
432
+ 111208, 111217, 111353, 111467, 111588, 111714, 111765, 111890, 111891,
433
+ 111918, 111997, 112034, 112403, 112458, 112464, 112488, 112495, 112515,
434
+ 112555, 112640, 112858, 112894, 113021, 113167, 113174, 113234, 113302,
435
+ 113398, 113436, 113565, 113598, 113744, 113845, 113883, 113889, 113907,
436
+ 113934, 113998, 114123, 114175, 114286, 114302, 114391, 114410, 114593,
437
+ 114601, 114645, 114864, 114937, 114985, 115001, 115088, 115108, 115177,
438
+ 115181, 115202, 115330, 115395, 115608, 115614, 115674, 115730, 115959,
439
+ 115984, 116156, 116293, 116582, 116683, 116804, 116979, 116996, 117062,
440
+ 117067, 117105, 117311, 117497, 117568, 117577, 117590, 117641, 117738,
441
+ 117746, 117957, 118110, 118739, 118895, 118896, 118932, 119009, 119551,
442
+ 119560, 119604, 119723, 119737, 119739, 119809, 120215, 120240, 120246,
443
+ 120379, 120398, 120456, 120738, 120834, 120893, 120993, 121040, 121052,
444
+ 121058, 121165, 121167, 121228, 121281, 121290, 121303, 121385, 121434,
445
+ 121443, 121460, 121654, 121656, 121699, 121701, 121958, 122021, 122121,
446
+ 122136, 122390, 122414, 122638, 122641, 122687, 123044, 123121, 123191,
447
+ 123270, 123310, 123408, 123483, 123611, 123711, 123780, 123920, 123924,
448
+ 124007, 124071, 124110, 124154, 124193, 124281, 124375, 124399, 124451,
449
+ 124515, 124720, 124800, 124838, 124961, 125027, 125123, 125168, 125434,
450
+ 125658, 125747, 125938, 126022, 126028, 126111, 126123, 126302, 126397,
451
+ 126434, 126472, 126529, 126570, 126621, 126744, 126786, 127057, 127060,
452
+ 127097, 127497, 127557, 127663, 127774, 127812, 127918, 127935, 127954,
453
+ 127973, 128030, 128078, 128118, 128225, 128232, 128276, 128294, 128302,
454
+ 128372, 128559, 128608, 128656, 128712, 128754, 128759, 129247, 129272,
455
+ 129310, 129340, 129435, 129453, 129573, 129633, 129636, 129852, 129901,
456
+ 130108, 130127, 130133, 130336, 130391, 130420, 130498, 130619, 130889,
457
+ 130902, 131065, 131157, 131292, 131336, 131353, 131356, 131417, 131500,
458
+ 131507, 131556, 131901, 132088, 132178, 132615, 133067, 133119, 133146,
459
+ 133197, 133341, 133380, 133383, 133517, 133539, 133562, 133604, 133710,
460
+ 133723, 133972, 133979, 133986, 134009, 134030, 134577, 134643, 134727,
461
+ 134753, 134768, 134889, 134925, 135239, 135361, 135606, 135743, 135794,
462
+ 135802, 135958, 135997, 136051, 136153, 136189, 136267, 136271, 136320,
463
+ 136331, 136391, 136395, 136487, 136658, 136704, 136801, 136881, 137087,
464
+ 137267, 137315, 137528, 137538, 137679, 137783, 137908, 138097, 138353,
465
+ 138398, 138569, 138614, 138695, 138708, 138828, 138879, 139057, 139150,
466
+ 139283, 139306, 139358, 139453, 139463, 139564, 139885, 140023, 140030,
467
+ 140322, 140405, 140407, 140437, 140566, 140568, 140671, 140683, 140879,
468
+ 141281, 141506, 141554, 141593, 141605, 141853, 141871, 141948, 142057,
469
+ 142089, 142106, 142129, 142231, 142288, 142306, 142462, 142520, 142580,
470
+ 143103, 143257, 143292, 143419, 143756, 143816, 143850, 144061, 144472,
471
+ 144518, 144588, 144681, 144686, 144726, 145002, 145119, 145121, 145210,
472
+ 145242, 145402, 145452, 145518, 145679, 145682, 145739, 145852, 145917,
473
+ 145921, 146166, 146295, 146434, 146756, 146799, 146959, 147001, 147039,
474
+ 147169, 147241, 147361, 147663, 147791, 147796, 147987, 148094, 148147,
475
+ 148149, 148360, 148428, 148430, 148656, 148822, 148970, 149028, 149223,
476
+ 149475, 149571, 149638, 149705, 149795, 149975, 149984, 150057, 150183,
477
+ 150226, 150671, 150733, 150813, 150819, 150872, 150910, 150934, 151103,
478
+ 151217, 151268, 151411, 151478, 151567, 151612, 151622, 151678, 151735,
479
+ 151805, 151887, 151936, 152041, 152057, 152245, 152254, 152372, 152390,
480
+ 152395, 152455, 152470, 152723, 152799, 152956, 153026, 153102, 153154,
481
+ 153202, 153270, 153296, 153336, 153519, 153725, 153875, 153878, 153946,
482
+ 153990, 154000, 154248, 154620, 154640, 154728, 154736, 154737, 154941,
483
+ 154955, 155032, 155092, 155098, 155150, 155156, 155201, 155233, 155427,
484
+ 155561, 155633, 155779, 155887, 155954, 156065, 156128, 156231, 156287,
485
+ 156290, 156353, 156573, 156821, 156841, 156844, 157030, 157129, 157295,
486
+ 157361, 157450, 157543, 157698, 157743, 157761, 157792, 157864, 157888,
487
+ 157942, 157955, 158104, 158128, 158217, 158235, 158301, 158397, 158551,
488
+ 158705, 159186, 159224, 159306, 159488, 159561, 159653, 159791, 159866,
489
+ 159880, 159955, 160003, 160051, 160184, 160355, 160561, 160564, 160629,
490
+ 160790, 160889, 161076, 161238, 161281, 161308, 161313, 161459, 161601,
491
+ 161800, 161902, 162025, 162131, 162176, 162181, 162189, 162253, 162342,
492
+ 162403, 162442, 162451, 162490, 162764, 163022, 163078, 163376, 163459,
493
+ ];
@@ -0,0 +1,55 @@
1
+ import { KIMI_CJK_SINGLE_CHAR_TOKEN_IDS } from "./kimi-cjk-token-ids.js";
2
+
3
+ /**
4
+ * Named logit-bias presets that a profile may opt into via the `logitBias`
5
+ * field on `ProfileEntry` (see `config/schemas/llm.ts`). A preset resolves to a
6
+ * `{ "<tokenId>": bias }` map that OpenAI-compatible providers forward as the
7
+ * `logit_bias` request field.
8
+ *
9
+ * Presets are profile-scoped: `RetryProvider.normalizeSendMessageOptions`
10
+ * resolves the active profile's `logitBias` and only attaches the map on the
11
+ * Fireworks (OpenAI-compatible) path, so it never reaches providers/models it
12
+ * wasn't built for. Token IDs are tokenizer-specific — `suppress-cjk` only makes
13
+ * sense for the Kimi-tokenizer models Fireworks serves.
14
+ *
15
+ * The valid preset names must match the `logitBias` enum in
16
+ * `config/schemas/llm.ts` (kept as a plain literal there to avoid a schema →
17
+ * provider import cycle).
18
+ */
19
+
20
+ /**
21
+ * Soft negative bias applied to each CJK token. -4 discourages *spontaneous*
22
+ * Chinese (a marginal-probability slip) while leaving explicitly-requested
23
+ * Chinese (dominant-probability tokens) intact. Not a hard ban (-100 would
24
+ * clip legitimate CJK); tunable if slips persist in real usage.
25
+ */
26
+ export const SUPPRESS_CJK_BIAS = -4;
27
+
28
+ let suppressCjkMap: Readonly<Record<string, number>> | undefined;
29
+
30
+ function buildSuppressCjkMap(): Readonly<Record<string, number>> {
31
+ const map: Record<string, number> = {};
32
+ for (const id of KIMI_CJK_SINGLE_CHAR_TOKEN_IDS) {
33
+ map[id] = SUPPRESS_CJK_BIAS;
34
+ }
35
+ return map;
36
+ }
37
+
38
+ /**
39
+ * Resolve a preset to its `logit_bias` map for `model`, or `undefined` when the
40
+ * preset is unknown or doesn't apply to the model. `suppress-cjk`'s token IDs
41
+ * come from the Kimi tokenizer, so it only resolves for Kimi models — this keeps
42
+ * the preset from being misapplied to a different-tokenizer model that happened
43
+ * to inherit it. The map is built once and cached (a constant ~5.3k-entry object
44
+ * reused across every request on the owning profile).
45
+ */
46
+ export function resolveLogitBiasPreset(
47
+ preset: string,
48
+ model: string,
49
+ ): Readonly<Record<string, number>> | undefined {
50
+ if (preset === "suppress-cjk" && /kimi/i.test(model)) {
51
+ suppressCjkMap ??= buildSuppressCjkMap();
52
+ return suppressCjkMap;
53
+ }
54
+ return undefined;
55
+ }
@@ -309,6 +309,9 @@ export class OpenAIChatCompletionsProvider implements Provider {
309
309
  const maxTokens = configObj?.max_tokens as number | undefined;
310
310
  const modelOverride = configObj?.model as string | undefined;
311
311
  const effort = configObj?.effort as string | undefined;
312
+ const logitBias = configObj?.logit_bias as
313
+ | Record<string, number>
314
+ | undefined;
312
315
  const usageAttributionHeaders = configObj?.usageAttributionHeaders as
313
316
  | Record<string, string>
314
317
  | undefined;
@@ -329,6 +332,12 @@ export class OpenAIChatCompletionsProvider implements Provider {
329
332
  params.max_completion_tokens = maxTokens;
330
333
  }
331
334
 
335
+ // Profile-scoped token biasing (e.g. the `suppress-cjk` preset). Resolved
336
+ // and gated to this provider family upstream in `RetryProvider`.
337
+ if (logitBias) {
338
+ params.logit_bias = logitBias;
339
+ }
340
+
332
341
  // Subclasses (OpenRouter) may already have nested effort under
333
342
  // `reasoning.effort` via `buildExtraCreateParams`. Skip the flat
334
343
  // `reasoning_effort` assignment in that case to avoid sending both forms,
@@ -641,7 +650,16 @@ export class OpenAIChatCompletionsProvider implements Provider {
641
650
  : {}),
642
651
  },
643
652
  stopReason: finishReason,
644
- rawRequest: params,
653
+ // `rawRequest` is persisted to the request-log DB and inspector on every
654
+ // call. A `logit_bias` preset (e.g. `suppress-cjk`) is ~5.3k deterministic
655
+ // entries (~68KB); summarize it here so logs don't balloon. The full map
656
+ // still went out on the wire above.
657
+ rawRequest: params.logit_bias
658
+ ? {
659
+ ...params,
660
+ logit_bias: `<${Object.keys(params.logit_bias).length} token biases omitted>`,
661
+ }
662
+ : params,
645
663
  rawResponse,
646
664
  };
647
665
  } catch (error) {
@@ -13,6 +13,7 @@ import {
13
13
  isRetryableNetworkError,
14
14
  sleep,
15
15
  } from "../util/retry.js";
16
+ import { resolveLogitBiasPreset } from "./inference/logit-bias.js";
16
17
  import {
17
18
  isThinkingConfigDisabled,
18
19
  normalizeThinkingConfigForWire,
@@ -277,6 +278,27 @@ function normalizeSendMessageOptions(
277
278
  ) {
278
279
  nextConfig.openrouter = { only: resolved.openrouter.only };
279
280
  }
281
+ // Forward a profile's opted-in `logit_bias` preset only on the Fireworks
282
+ // (OpenAI-compatible) path. `resolved.logitBias` is set by the resolver from
283
+ // the single winning profile (not the deep-merge), so it can't leak from a
284
+ // lower-precedence profile into one that didn't opt in.
285
+ // `resolveLogitBiasPreset` additionally gates on the resolved model's
286
+ // tokenizer. Strict-schema clients (Anthropic) reject unknown body fields,
287
+ // hence the provider gate.
288
+ if (
289
+ providerName === "fireworks" &&
290
+ nextConfig.logit_bias === undefined &&
291
+ resolved.logitBias !== undefined &&
292
+ typeof nextConfig.model === "string"
293
+ ) {
294
+ const biasMap = resolveLogitBiasPreset(
295
+ resolved.logitBias,
296
+ nextConfig.model,
297
+ );
298
+ if (biasMap !== undefined) {
299
+ nextConfig.logit_bias = biasMap;
300
+ }
301
+ }
280
302
  // `contextWindow` and `provider` are server-side concerns, not provider
281
303
  // request parameters: effective context is resolved per call site/profile
282
304
  // by the agent/conversation path, while `provider` selection is handled by
@@ -207,6 +207,12 @@ export interface SendMessageConfig {
207
207
  effort?: "none" | "low" | "medium" | "high" | "xhigh" | "max";
208
208
  speed?: "standard" | "fast";
209
209
  verbosity?: "low" | "medium" | "high";
210
+ /**
211
+ * Wire-format `logit_bias` map (`{ "<tokenId>": bias }`). Set by
212
+ * `RetryProvider` from a profile's `logitBias` preset and forwarded only on
213
+ * the OpenAI-compatible (Fireworks) path; other providers ignore it.
214
+ */
215
+ logit_bias?: Record<string, number>;
210
216
  /**
211
217
  * When true, the most recent user message's content varies across
212
218
  * otherwise-identical turns (e.g. a per-turn memory block was injected into