zidane 7.1.10 → 7.2.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.
Files changed (100) hide show
  1. package/dist/{acp-Bt-eb5Z8.js → acp-D-tVyUjw.js} +2 -2
  2. package/dist/{acp-Bt-eb5Z8.js.map → acp-D-tVyUjw.js.map} +1 -1
  3. package/dist/acp-cli.js +4 -4
  4. package/dist/acp.d.ts +1 -1
  5. package/dist/acp.js +1 -1
  6. package/dist/{agent-B6etKd_o.js → agent-D0zZnGbt.js} +135 -6
  7. package/dist/agent-D0zZnGbt.js.map +1 -0
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/agent.js +1 -1
  10. package/dist/{anthropic-BQdAnY-w.js → anthropic-C2aole0G.js} +83 -100
  11. package/dist/anthropic-C2aole0G.js.map +1 -0
  12. package/dist/{approvals-CIKGWmiU.js → approvals-CnE_8JVZ.js} +53 -11
  13. package/dist/approvals-CnE_8JVZ.js.map +1 -0
  14. package/dist/{auth-CDDNbEmd.js → auth-BG2rVKSt.js} +2 -2
  15. package/dist/{auth-CDDNbEmd.js.map → auth-BG2rVKSt.js.map} +1 -1
  16. package/dist/chat/pure.d.ts +24 -8
  17. package/dist/chat/pure.d.ts.map +1 -1
  18. package/dist/chat/pure.js +248 -3
  19. package/dist/chat/pure.js.map +1 -0
  20. package/dist/chat.d.ts +6 -6
  21. package/dist/chat.js +4 -4
  22. package/dist/contexts/daytona.d.ts +1 -1
  23. package/dist/contexts/e2b.d.ts +1 -1
  24. package/dist/daemon-cli.js +1 -1
  25. package/dist/eval.d.ts +1 -1
  26. package/dist/extensions.d.ts +2 -2
  27. package/dist/extensions.js +1 -1
  28. package/dist/headless.d.ts +1 -1
  29. package/dist/headless.js +1 -1
  30. package/dist/{index-dXnPmqFx.d.ts → index-BgN1T3lk.d.ts} +342 -109
  31. package/dist/index-BgN1T3lk.d.ts.map +1 -0
  32. package/dist/{index-C45NxBZm.d.ts → index-CWHSTD2Q.d.ts} +5 -5
  33. package/dist/{index-C45NxBZm.d.ts.map → index-CWHSTD2Q.d.ts.map} +1 -1
  34. package/dist/index.d.ts +2 -2
  35. package/dist/index.js +2 -2
  36. package/dist/{ipc-CNRlwg7u.js → ipc-Cu29nNEz.js} +2 -2
  37. package/dist/{ipc-CNRlwg7u.js.map → ipc-Cu29nNEz.js.map} +1 -1
  38. package/dist/ipc.d.ts +5 -5
  39. package/dist/ipc.js +3 -3
  40. package/dist/mcp.d.ts +1 -1
  41. package/dist/output/stream-json.d.ts +1 -1
  42. package/dist/output/terminal.d.ts +1 -1
  43. package/dist/panels-B6gRk4bf.js.map +1 -1
  44. package/dist/plugins.d.ts +1 -1
  45. package/dist/presets.d.ts +1 -1
  46. package/dist/presets.js +1 -1
  47. package/dist/providers/anthropic.d.ts +1 -1
  48. package/dist/providers/anthropic.js +1 -1
  49. package/dist/providers/arcee.d.ts +1 -1
  50. package/dist/providers/baseten.d.ts +1 -1
  51. package/dist/providers/cerebras.d.ts +1 -1
  52. package/dist/providers/local.d.ts +1 -1
  53. package/dist/providers/openai-compat.d.ts +1 -1
  54. package/dist/providers/openai.d.ts +1 -1
  55. package/dist/providers/openai.js +3 -2
  56. package/dist/providers/openai.js.map +1 -1
  57. package/dist/providers/openrouter.d.ts +1 -1
  58. package/dist/providers/xai.d.ts +1 -1
  59. package/dist/providers.d.ts +1 -1
  60. package/dist/providers.js +1 -1
  61. package/dist/restate.d.ts +1 -1
  62. package/dist/restate.js +1 -1
  63. package/dist/session/sqlite.d.ts +19 -2
  64. package/dist/session/sqlite.d.ts.map +1 -1
  65. package/dist/session/sqlite.js +45 -1
  66. package/dist/session/sqlite.js.map +1 -1
  67. package/dist/session.d.ts +1 -1
  68. package/dist/{shell-path-Db04cLEP.js → shell-path-DWo7ooWv.js} +6 -6
  69. package/dist/{shell-path-Db04cLEP.js.map → shell-path-DWo7ooWv.js.map} +1 -1
  70. package/dist/skills.d.ts +1 -1
  71. package/dist/{todo-edits-PxMJvYIX.js → todo-edits-UOwgxGKu.js} +74 -13
  72. package/dist/todo-edits-UOwgxGKu.js.map +1 -0
  73. package/dist/{tool-formatters-Bl1afA8N.d.ts → tool-formatters-DoRLnfuD.d.ts} +5 -3
  74. package/dist/tool-formatters-DoRLnfuD.d.ts.map +1 -0
  75. package/dist/tools/fetch-url.d.ts +1 -1
  76. package/dist/tools/web-search.d.ts +1 -1
  77. package/dist/tools.d.ts +1 -1
  78. package/dist/tools.js +1 -1
  79. package/dist/{transcript-anchors-BfI3ZXh1.d.ts → transcript-anchors-BeudMbXx.d.ts} +12 -4
  80. package/dist/transcript-anchors-BeudMbXx.d.ts.map +1 -0
  81. package/dist/tui.d.ts +3 -3
  82. package/dist/tui.d.ts.map +1 -1
  83. package/dist/tui.js +290 -40
  84. package/dist/tui.js.map +1 -1
  85. package/dist/{turn-operations-D0x_g6XQ.d.ts → turn-operations-C8bMBDl_.d.ts} +3 -3
  86. package/dist/{turn-operations-D0x_g6XQ.d.ts.map → turn-operations-C8bMBDl_.d.ts.map} +1 -1
  87. package/dist/{turn-operations-D_k_FEur.js → turn-operations-DrbJlpq9.js} +5 -2
  88. package/dist/turn-operations-DrbJlpq9.js.map +1 -0
  89. package/dist/types.d.ts +1 -1
  90. package/docs/EXTENSIONS.md +1 -1
  91. package/docs/PANELS.md +16 -2
  92. package/package.json +3 -3
  93. package/dist/agent-B6etKd_o.js.map +0 -1
  94. package/dist/anthropic-BQdAnY-w.js.map +0 -1
  95. package/dist/approvals-CIKGWmiU.js.map +0 -1
  96. package/dist/index-dXnPmqFx.d.ts.map +0 -1
  97. package/dist/todo-edits-PxMJvYIX.js.map +0 -1
  98. package/dist/tool-formatters-Bl1afA8N.d.ts.map +0 -1
  99. package/dist/transcript-anchors-BfI3ZXh1.d.ts.map +0 -1
  100. package/dist/turn-operations-D_k_FEur.js.map +0 -1
package/dist/agent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $_ as hydrateReadStateFromSession, $i as McpToolMeta, $r as RunSummaryTokens, Am as installCacheBreakLogger, Cm as CacheDimensionDiff, Dm as diffCacheDimensions, Em as CacheDriftInfo, Gr as RunSummary, J_ as HydrateReadStateOptions, Ji as AgentHookMap, Jr as RunSummaryByModel, Kr as RunSummaryBlock, Om as fnv1a32, Qi as McpConnector, Qr as RunSummaryRepeatGuard, Sm as CacheBreakLoggerOptions, Tm as CacheDimensionSnapshot, X_ as ReadStateMap, Xi as AgentOptions, Xr as RunSummaryCollectorOptions, Y_ as ReadStateEntry, Yi as AgentHooks, Yr as RunSummaryCollector, Z_ as getReadState, Zr as RunSummaryError, ea as McpToolWrap, ei as RunSummaryValidation, ev as hydrateReadStateFromSessionAsync, jm as snapshotCacheDimensions, km as hashMessages, nv as resolveReadStateMap, qi as Agent, qr as RunSummaryBudget, ta as createAgent, ti as createRunSummaryCollector, tv as readStateKey, wm as CacheDimensionName, xm as CacheBreakInfo } from "./index-dXnPmqFx.js";
1
+ import { $i as McpToolMeta, $m as CacheDriftInfo, $r as RunSummaryTokens, Cv as ReadStateMap, Dv as hydrateReadStateFromSessionAsync, Ev as hydrateReadStateFromSession, Gr as RunSummary, Ji as AgentHookMap, Jm as CacheBreakInfo, Jr as RunSummaryByModel, Kr as RunSummaryBlock, Ov as readStateKey, Qi as McpConnector, Qm as CacheDimensionSnapshot, Qr as RunSummaryRepeatGuard, Sv as ReadStateEntry, Xi as AgentOptions, Xm as CacheDimensionDiff, Xr as RunSummaryCollectorOptions, Yi as AgentHooks, Ym as CacheBreakLoggerOptions, Yr as RunSummaryCollector, Zm as CacheDimensionName, Zr as RunSummaryError, ea as McpToolWrap, eh as diffCacheDimensions, ei as RunSummaryValidation, ih as snapshotCacheDimensions, kv as resolveReadStateMap, nh as hashMessages, qi as Agent, qr as RunSummaryBudget, rh as installCacheBreakLogger, ta as createAgent, th as fnv1a32, ti as createRunSummaryCollector, wv as getReadState, xv as HydrateReadStateOptions } from "./index-BgN1T3lk.js";
2
2
  export { type Agent, type AgentHookMap, type AgentHooks, type AgentOptions, type CacheBreakInfo, type CacheBreakLoggerOptions, type CacheDimensionDiff, type CacheDimensionName, type CacheDimensionSnapshot, type CacheDriftInfo, type HydrateReadStateOptions, type McpConnector, type McpToolMeta, type McpToolWrap, type ReadStateEntry, type ReadStateMap, type RunSummary, type RunSummaryBlock, type RunSummaryBudget, type RunSummaryByModel, type RunSummaryCollector, type RunSummaryCollectorOptions, type RunSummaryError, type RunSummaryRepeatGuard, type RunSummaryTokens, type RunSummaryValidation, createAgent, createRunSummaryCollector, diffCacheDimensions, fnv1a32, getReadState, hashMessages, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, installCacheBreakLogger, readStateKey, resolveReadStateMap, snapshotCacheDimensions };
package/dist/agent.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ar as hydrateReadStateFromSessionAsync, ir as hydrateReadStateFromSession, nr as getReadState, or as readStateKey, sr as resolveReadStateMap, t as createAgent } from "./agent-B6etKd_o.js";
1
+ import { ar as hydrateReadStateFromSessionAsync, ir as hydrateReadStateFromSession, nr as getReadState, or as readStateKey, sr as resolveReadStateMap, t as createAgent } from "./agent-D0zZnGbt.js";
2
2
  import { a as snapshotCacheDimensions, i as installCacheBreakLogger, n as fnv1a32, r as hashMessages, t as diffCacheDimensions } from "./cache-telemetry-D0xemhgK.js";
3
3
  import { t as createRunSummaryCollector } from "./run-summary-BU_NgwUT.js";
4
4
  export { createAgent, createRunSummaryCollector, diffCacheDimensions, fnv1a32, getReadState, hashMessages, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, installCacheBreakLogger, readStateKey, resolveReadStateMap, snapshotCacheDimensions };
@@ -11,13 +11,14 @@ import { createHash, randomUUID } from "node:crypto";
11
11
  /**
12
12
  * Anthropic "fast mode" — `speed: "fast"` on the Messages API. ~2.5× output
13
13
  * tokens/sec at a per-model price multiplier. Supported on Opus 4.6 / 4.7 /
14
- * 4.8 / 5 only; the API errors if sent on any other model, so it's attached
15
- * just to those entries (see {@link FAST_MODE_OPTIONS}).
14
+ * 4.8 / 5 / 5.5 only; the API errors if sent on any other model, so it's
15
+ * attached just to those entries (see {@link FAST_MODE_OPTIONS}).
16
16
  *
17
17
  * The multiplier scales ALL rate components (input, output, and both cache
18
18
  * rates) uniformly: per Anthropic, "prompt caching multipliers apply on top of
19
- * fast mode pricing" across the full context window. Opus 5 and 4.8 are 2×
20
- * ($5/$25 → $10/$50); Opus 4.6 / 4.7 are a steeper 6× ($5/$25 → $30/$150).
19
+ * fast mode pricing" across the full context window. Opus 5.5 ($4/$20 →
20
+ * $8/$40), 5 and 4.8 ($5/$25 → $10/$50) are 2×; Opus 4.6 / 4.7 are a steeper
21
+ * 6× ($5/$25 → $30/$150).
21
22
  * See https://platform.claude.com/docs/en/build-with-claude/fast-mode.
22
23
  */
23
24
  const FAST_MODE_OPTION = {
@@ -43,6 +44,7 @@ const FAST_MODE_OPTION_LEGACY = {
43
44
  };
44
45
  /** Model ids that accept `speed: "fast"`, mapped to their fast-mode option. */
45
46
  const FAST_MODE_OPTIONS = {
47
+ "claude-opus-5-5": FAST_MODE_OPTION,
46
48
  "claude-opus-5": FAST_MODE_OPTION,
47
49
  "claude-opus-4-8": FAST_MODE_OPTION,
48
50
  "claude-opus-4-7": FAST_MODE_OPTION_LEGACY,
@@ -58,101 +60,28 @@ function fastModeCostMultiplier(modelId) {
58
60
  return FAST_MODE_OPTIONS[modelId]?.costMultiplier;
59
61
  }
60
62
  /**
61
- * Claude Fable 5.1 — GA 2026-09-01, `claude-fable-5-1`. Same input/output price
62
- * as Fable 5 ($10/$50 per MTok) with cache reads cut 75% ($1 → $0.25); 1M
63
- * context, 128k output, adaptive thinking always on, vision. Rates are the
64
- * published table, not inferred: input $10, 5m cache write $12.50, 1h cache
65
- * write $20, cache hit $0.25, output $50.
66
- * See https://platform.claude.com/docs/en/models/fable-5-1/overview.
63
+ * Currently empty: pi-ai 0.87.1 bundles every GA Anthropic model up to and
64
+ * including Claude Opus 5.5 (2026-09-22) — Opus 4.8 / 5 / 5.5, Fable 5 / 5.1,
65
+ * Sonnet 4.6 / 5, Haiku 4.5 — with published rates, 1M context and 128k output.
67
66
  *
68
- * CAVEAT — this model REJECTS forced tool use: `tool_choice` of `any` or `tool`
69
- * returns 400. Zidane pins a forced tool for structured output (`loop.ts`,
70
- * `generate-data.ts`, the eval judge), so those paths fail on this model. Not
71
- * handled here; adding the entry only makes the model selectable.
72
- *
73
- * Claude Opus 5 — GA 2026-07-24. The announcement confirms $5/$25 per MTok
74
- * (same as Opus 4.8) and fast mode at 2×; the 1M context, 128k output, and
75
- * cache rates are ASSUMED from Opus 4.8 — verify against the model docs once
76
- * they're up. See https://www.anthropic.com/news/claude-opus-5.
77
- *
78
- * Claude Fable 5 — GA 2026-06-09. Anthropic's most capable widely released
79
- * model: $10/$50 per MTok, 1M context, 128k output, adaptive thinking
80
- * (always on), vision. No fast-mode support (Opus 4.6/4.7/4.8/5 only).
81
- *
82
- * Claude Opus 4.8 — shipped 2026-05-28. Same price/context/output as Opus 4.7
83
- * ($5/$25 per MTok, 1M context, 128k output), adaptive thinking, vision.
84
- * See https://www.anthropic.com/news/claude-opus-4-8.
85
- *
86
- * Claude Mythos 5 / 5.1 are deliberately absent: invitation-only (Project
87
- * Glasswing) despite sharing Fable's specs and pricing, so they would be dead
88
- * picker entries for virtually all users.
67
+ * When adding a stopgap entry, mirror pi-ai's `ModelInfo` shape and set
68
+ * `provider: 'anthropic'`. Known caveats worth carrying over in the comment:
69
+ * Fable 5 / 5.1 REJECT forced tool use (`tool_choice` of `any` or `tool`
70
+ * returns 400), which breaks zidane's structured-output paths (`loop.ts`,
71
+ * `generate-data.ts`, the eval judge) — Opus 5.5 rejects it too, handled
72
+ * generically by the learned `MODELS_REJECTING_FORCED_TOOL_CHOICE` retry in
73
+ * providers/anthropic.ts. Opus 5.5 also REJECTS non-adaptive thinking:
74
+ * `thinking: {type:'enabled', budget_tokens}` and `{type:'disabled'}` both 400
75
+ * with `"thinking.type.enabled/disabled" is not supported for this model`;
76
+ * zidane's explicit-budget path (`behavior.thinkingBudget`, the Bedrock-only
77
+ * shape) emits `enabled`, so the provider catches that 400 and retries as
78
+ * adaptive (`MODELS_REJECTING_ENABLED_THINKING`). Claude Mythos 5 / 5.1 are
79
+ * deliberately absent: invitation-only (Project Glasswing), so they would be
80
+ * dead picker entries for virtually all users.
89
81
  *
90
82
  * See https://platform.claude.com/docs/en/about-claude/models/overview.
91
83
  */
92
- const ANTHROPIC_EXTRA_MODELS = [
93
- {
94
- id: "claude-fable-5-1",
95
- name: "Claude Fable 5.1",
96
- reasoning: true,
97
- input: ["text", "image"],
98
- cost: {
99
- input: 10,
100
- output: 50,
101
- cacheRead: .25,
102
- cacheWrite: 12.5
103
- },
104
- contextWindow: 1e6,
105
- maxTokens: 128e3,
106
- provider: "anthropic"
107
- },
108
- {
109
- id: "claude-opus-5",
110
- name: "Claude Opus 5",
111
- reasoning: true,
112
- input: ["text", "image"],
113
- cost: {
114
- input: 5,
115
- output: 25,
116
- cacheRead: .5,
117
- cacheWrite: 6.25
118
- },
119
- contextWindow: 1e6,
120
- maxTokens: 128e3,
121
- provider: "anthropic",
122
- options: [FAST_MODE_OPTION]
123
- },
124
- {
125
- id: "claude-fable-5",
126
- name: "Claude Fable 5",
127
- reasoning: true,
128
- input: ["text", "image"],
129
- cost: {
130
- input: 10,
131
- output: 50,
132
- cacheRead: 1,
133
- cacheWrite: 12.5
134
- },
135
- contextWindow: 1e6,
136
- maxTokens: 128e3,
137
- provider: "anthropic"
138
- },
139
- {
140
- id: "claude-opus-4-8",
141
- name: "Claude Opus 4.8",
142
- reasoning: true,
143
- input: ["text", "image"],
144
- cost: {
145
- input: 5,
146
- output: 25,
147
- cacheRead: .5,
148
- cacheWrite: 6.25
149
- },
150
- contextWindow: 1e6,
151
- maxTokens: 128e3,
152
- provider: "anthropic",
153
- options: [FAST_MODE_OPTION]
154
- }
155
- ];
84
+ const ANTHROPIC_EXTRA_MODELS = [];
156
85
  //#endregion
157
86
  //#region src/providers/anthropic-claude-code.ts
158
87
  /**
@@ -190,10 +119,10 @@ const ANTHROPIC_EXTRA_MODELS = [
190
119
  * was compiled with (Bun 1.4 reports `v26.3.0`);
191
120
  * - `CLAUDE_CLIENT_VERSION`: the desktop-app client version header; keep
192
121
  * unless a trace shows otherwise.
193
- * Verified against 2.1.266 (2026-09-09).
122
+ * Verified against 2.1.280 (2026-09-23).
194
123
  */
195
- const CLAUDE_CODE_VERSION = "2.1.266";
196
- const CLAUDE_AGENT_SDK_VERSION = "0.3.266";
124
+ const CLAUDE_CODE_VERSION = "2.1.280";
125
+ const CLAUDE_AGENT_SDK_VERSION = "0.3.280";
197
126
  const CLAUDE_CLIENT_VERSION = "1.11187.4";
198
127
  const CLAUDE_CODE_STAINLESS_PACKAGE_VERSION = "0.112.1";
199
128
  const CLAUDE_CODE_STAINLESS_RUNTIME_VERSION = "v26.3.0";
@@ -1577,6 +1506,54 @@ function isForcedToolChoice(choice) {
1577
1506
  return choice?.type === "tool" || choice?.type === "any";
1578
1507
  }
1579
1508
  /**
1509
+ * Models observed rejecting the explicit-budget thinking shape
1510
+ * (`thinking: { type: 'enabled', budget_tokens }`), so later calls skip the
1511
+ * failing round-trip and downgrade to adaptive up front.
1512
+ *
1513
+ * Learned, not declared — same rationale as
1514
+ * {@link MODELS_REJECTING_FORCED_TOOL_CHOICE}. Claude Opus 5.5 is the first
1515
+ * model where the `enabled` shape 400s (adaptive-only, thinking always on);
1516
+ * successors that follow suit are caught without a catalog edit.
1517
+ */
1518
+ const MODELS_REJECTING_ENABLED_THINKING = /* @__PURE__ */ new Set();
1519
+ /**
1520
+ * True for the 400 Anthropic returns when a model does not support the manual
1521
+ * extended-thinking shape: `"thinking.type.enabled" is not supported for this
1522
+ * model. Use "thinking.type.adaptive" and "output_config.effort" ...`. Anchored
1523
+ * on the validation-400 gate plus the dotted field name and the "not supported
1524
+ * for this model" tail, so a reworded middle still matches while an unrelated
1525
+ * `thinking` validation error (bad budget, wrong type) does not. Only the
1526
+ * `enabled` variant is matched: zidane omits the field for the `'off'` level
1527
+ * (adaptive on these models) and never emits `thinking.type.disabled`.
1528
+ */
1529
+ function isEnabledThinkingUnsupportedError(err) {
1530
+ return isRequestValidationError(err) && /\bthinking\.type\.enabled\b[^.]+not supported for this model\b/i.test(errorText(err));
1531
+ }
1532
+ function isEnabledThinking(thinking) {
1533
+ return thinking?.type === "enabled";
1534
+ }
1535
+ /**
1536
+ * The same request with the explicit budget dropped: `thinking.type` flipped to
1537
+ * `adaptive`, `budget_tokens` removed, every other thinking field
1538
+ * (`display`, `block_binding`) kept. `temperature` stays pinned to 1 (adaptive
1539
+ * requires it, same as the enabled shape) and the budget-inflated `max_tokens`
1540
+ * is left as-is — it is already clamped to the model ceiling and an oversized
1541
+ * envelope is harmless for adaptive, which thinks and replies inside it. Any
1542
+ * `output_config.effort` the enabled path set survives on `params.output_config`.
1543
+ */
1544
+ function withoutEnabledThinking(params) {
1545
+ const thinking = params.thinking;
1546
+ if (!thinking || thinking.type !== "enabled") return params;
1547
+ const { budget_tokens: _dropped, type: _type, ...rest } = thinking;
1548
+ return {
1549
+ ...params,
1550
+ thinking: {
1551
+ ...rest,
1552
+ type: "adaptive"
1553
+ }
1554
+ };
1555
+ }
1556
+ /**
1580
1557
  * The same request with forcing removed: `tool_choice: auto` plus one trailing
1581
1558
  * system sentence naming what the model was being forced into.
1582
1559
  *
@@ -2181,6 +2158,10 @@ function anthropic(anthropicParams) {
2181
2158
  MODELS_REJECTING_FORCED_TOOL_CHOICE.add(modelId);
2182
2159
  return await runStream(withoutForcedToolChoice(requestParams), fastRequested, scrubPass, authPass);
2183
2160
  }
2161
+ if (!observedOutput && isEnabledThinking(requestParams.thinking) && isEnabledThinkingUnsupportedError(err)) {
2162
+ MODELS_REJECTING_ENABLED_THINKING.add(modelId);
2163
+ return await runStream(withoutEnabledThinking(requestParams), fastRequested, scrubPass, authPass);
2164
+ }
2184
2165
  throw err;
2185
2166
  }
2186
2167
  if (inputTransformations && inputTransformations.length > 0) try {
@@ -2220,7 +2201,9 @@ function anthropic(anthropicParams) {
2220
2201
  usage
2221
2202
  };
2222
2203
  };
2223
- const result = await runStream(isForcedToolChoice(params.tool_choice) && MODELS_REJECTING_FORCED_TOOL_CHOICE.has(modelId) ? withoutForcedToolChoice(params) : params, options.modelOptions?.fast === true && !callIsOAuth);
2204
+ let initialParams = isForcedToolChoice(params.tool_choice) && MODELS_REJECTING_FORCED_TOOL_CHOICE.has(modelId) ? withoutForcedToolChoice(params) : params;
2205
+ if (isEnabledThinking(initialParams.thinking) && MODELS_REJECTING_ENABLED_THINKING.has(modelId)) initialParams = withoutEnabledThinking(initialParams);
2206
+ const result = await runStream(initialParams, options.modelOptions?.fast === true && !callIsOAuth);
2224
2207
  diagnostic.finish("success");
2225
2208
  return result;
2226
2209
  } catch (err) {
@@ -2235,4 +2218,4 @@ function anthropic(anthropicParams) {
2235
2218
  //#endregion
2236
2219
  export { FAST_MODE_OPTIONS as _, buildAnthropicClientOptions as a, credentialIdentity as c, resolveAnthropicAuthShape as d, resolveAnthropicBetas as f, ANTHROPIC_EXTRA_MODELS as g, sanitizeProviderDiagnosticMetadata as h, applyAnthropicCacheBreakpoints as i, defaultAnthropicMaxTokens as l, resolveThinkingBinding as m, THINKING_BINDING_SETTING_ENV as n, cacheWriteTtlMultiplier as o, resolveAnthropicMaxOutput as p, anthropic as r, classifyAnthropicError as s, EXTENDED_CACHE_TTL_BETA as t, planAnthropicThinking as u };
2237
2220
 
2238
- //# sourceMappingURL=anthropic-BQdAnY-w.js.map
2221
+ //# sourceMappingURL=anthropic-C2aole0G.js.map