@ai-sdk/provider-utils 5.0.58 → 5.0.60

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
@@ -1,5 +1,20 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 5.0.60
4
+
5
+ ### Patch Changes
6
+
7
+ - 2e89fa4: fix(provider-utils): keep case-sensitive url paths and query values
8
+
9
+ ## 5.0.59
10
+
11
+ ### Patch Changes
12
+
13
+ - 9667bf2: docs(provider-utils): clarify how `ToolApprovalResponse.reason` is handled for approved and denied tool calls
14
+ - 81663cc: fix(provider-utils): accept exact criteria labels in decision choice responses
15
+ - Updated dependencies [e57803c]
16
+ - @ai-sdk/provider@4.0.27
17
+
3
18
  ## 5.0.58
4
19
 
5
20
  ### Patch Changes
@@ -1311,7 +1311,8 @@ var DecisionLanguageModel = class DecisionLanguageModel {
1311
1311
  const value = values[`q${index}`];
1312
1312
  if (question.type === "choice") {
1313
1313
  const options = Object.keys(question.criteria);
1314
- const choiceIndex = options.findIndex((_, i) => value === `c${i}`);
1314
+ let choiceIndex = options.findIndex((_, i) => value === `c${i}`);
1315
+ if (choiceIndex === -1 && typeof value === "string") choiceIndex = options.indexOf(value);
1315
1316
  if (choiceIndex === -1) throw new InvalidResponseDataError({
1316
1317
  data: values,
1317
1318
  message: `Question "${id}" selected an unknown option.`