@oh-my-pi/pi-ai 18.9.0 → 18.9.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.9.1] - 2026-10-11
6
+
7
+ ### Added
8
+
9
+ - Added `compat.supportsThinkingBindingControls` for Bedrock Converse: setting it to `false` stops prefix-bound Claude requests from sending `thinking.block_binding`, the `thinking-binding-controls-2026-08-01` beta and the `/input_transformations` response path, for gateways or regions that reject them ([#15316](https://github.com/can1357/oh-my-pi/pull/15316) by [@harshaygadekar](https://github.com/harshaygadekar))
10
+
11
+ ### Fixed
12
+
13
+ - Fixed Bedrock Claude Fable 5.1 requests with thinking off and a forced tool choice sending the forced choice next to adaptive thinking; the choice now falls back to `auto` ([#15316](https://github.com/can1357/oh-my-pi/pull/15316) by [@harshaygadekar](https://github.com/harshaygadekar))
14
+
5
15
  ## [18.9.0] - 2026-10-11
6
16
 
7
17
  ### Breaking Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-ai",
3
- "version": "18.9.0",
3
+ "version": "18.9.1",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "keywords": [
6
6
  "ai",
@@ -155,11 +155,11 @@
155
155
  "fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
156
156
  },
157
157
  "dependencies": {
158
- "@oh-my-pi/omptype": "18.9.0",
159
- "@oh-my-pi/pi-catalog": "18.9.0",
160
- "@oh-my-pi/pi-natives": "18.9.0",
161
- "@oh-my-pi/pi-utils": "18.9.0",
162
- "@oh-my-pi/pi-wire": "18.9.0"
158
+ "@oh-my-pi/omptype": "18.9.1",
159
+ "@oh-my-pi/pi-catalog": "18.9.1",
160
+ "@oh-my-pi/pi-natives": "18.9.1",
161
+ "@oh-my-pi/pi-utils": "18.9.1",
162
+ "@oh-my-pi/pi-wire": "18.9.1"
163
163
  },
164
164
  "devDependencies": {
165
165
  "@types/bun": "^1.3.14"
@@ -454,7 +454,7 @@ export const streamBedrock: StreamFunction<"bedrock-converse-stream"> = (
454
454
  isRecord(additionalModelRequestFields?.thinking) &&
455
455
  additionalModelRequestFields.thinking.type === "disabled";
456
456
  const prefixMismatchBehavior =
457
- !thinkingDisabled && model.thinking?.prefixBinding
457
+ !thinkingDisabled && model.thinking?.prefixBinding && model.compat.supportsThinkingBindingControls
458
458
  ? (options.anthropicPrefixMismatchBehavior ?? "drop_block")
459
459
  : undefined;
460
460
 
@@ -463,10 +463,11 @@ export const streamBedrock: StreamFunction<"bedrock-converse-stream"> = (
463
463
  const forcedChoice = toolConfig?.toolChoice?.any || toolConfig?.toolChoice?.tool;
464
464
  if (toolConfig && forcedChoice && !model.compat.supportsForcedToolChoice) {
465
465
  toolConfig = { ...toolConfig, toolChoice: { auto: {} } };
466
- } else if (toolConfig && forcedChoice && additionalModelRequestFields && !thinkingDisabled) {
467
- // Bedrock rejects thinking + forced tool_choice. Fable's adaptive
468
- // thinking cannot be disabled, so downgrade its forced choice instead.
469
- if (prefixMismatchBehavior) toolConfig = { ...toolConfig, toolChoice: { auto: {} } };
466
+ } else if (toolConfig && forcedChoice && !thinkingDisabled) {
467
+ // Bedrock rejects thinking + forced tool_choice. Prefix-bound lines (Fable)
468
+ // think adaptively even when no thinking field is sent, so downgrade their
469
+ // forced choice regardless of the binding controls; elsewhere drop thinking.
470
+ if (model.thinking?.prefixBinding) toolConfig = { ...toolConfig, toolChoice: { auto: {} } };
470
471
  else additionalModelRequestFields = undefined;
471
472
  }
472
473
  if (prefixMismatchBehavior) {