frizz 0.5.0 → 0.5.1

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.
@@ -19832,6 +19832,18 @@ function claudeUltracodeSettings() {
19832
19832
  return { ultracode: true };
19833
19833
  }
19834
19834
 
19835
+ // packages/server/src/backend/claude-context-window.ts
19836
+ var WINDOW_SUFFIX = "[1m]";
19837
+ var CLAUDE_1M_MODELS = ["fable", "opus", "sonnet"];
19838
+ function resolveClaudeLaunchModel(model) {
19839
+ if (!model) return void 0;
19840
+ if (model.endsWith(WINDOW_SUFFIX)) {
19841
+ return { model, fallbackModel: model.slice(0, -WINDOW_SUFFIX.length) };
19842
+ }
19843
+ if (!CLAUDE_1M_MODELS.includes(model)) return { model };
19844
+ return { model: `${model}${WINDOW_SUFFIX}`, fallbackModel: model };
19845
+ }
19846
+
19835
19847
  // packages/server/src/backend/claude-agent-sdk-protocol.ts
19836
19848
  var CLAUDE_AGENT_SDK_PROTOCOL_VERSION = 1;
19837
19849
  var CLAUDE_AGENT_SDK_MAX_INPUT_BYTES = 64 * 1024;
@@ -20612,6 +20624,7 @@ function startClaudeQuery(executablePath, options) {
20612
20624
  }
20613
20625
  } : void 0;
20614
20626
  const claudeEffort = resolveClaudeEffort(options.effort);
20627
+ const launchModel = resolveClaudeLaunchModel(options.model);
20615
20628
  const raw = uGe({
20616
20629
  prompt: input,
20617
20630
  options: {
@@ -20646,7 +20659,12 @@ function startClaudeQuery(executablePath, options) {
20646
20659
  // Keep Claude's default (preset) system prompt and APPEND the frizz worker contract, the SDK
20647
20660
  // equivalent of the tmux path's --append-system-prompt-file.
20648
20661
  ...options.appendSystemPrompt ? { systemPrompt: { type: "preset", preset: "claude_code", append: options.appendSystemPrompt } } : {},
20649
- ...options.model ? { model: options.model } : {},
20662
+ // The 1M context window rides the MODEL value as a `[1m]` suffix, always paired with the bare
20663
+ // alias as `fallbackModel` — an unavailable long-context beta is a hard 400 that kills the
20664
+ // session, and the fallback is what makes asking for it safe on every subscription. See
20665
+ // claude-context-window.ts for the measurements.
20666
+ ...launchModel ? { model: launchModel.model } : {},
20667
+ ...launchModel?.fallbackModel ? { fallbackModel: launchModel.fallbackModel } : {},
20650
20668
  // "ultracode" is not an `effort` value — it resolves to xhigh plus a session setting, and the two
20651
20669
  // must travel TOGETHER or the setting is silently ignored (see resolveClaudeEffort). `settings` is
20652
20670
  // an additional highest-precedence settings source, layered over `settingSources` above.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frizz",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "private": false,
5
5
  "description": "A local web UI for running many coding agents at once",
6
6
  "keywords": [