ai 6.0.0-beta.128 → 6.0.0-beta.129

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,11 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.0-beta.129
4
+
5
+ ### Patch Changes
6
+
7
+ - 67a407c: chore(ai): add warning when using v2 models with AISDK v6
8
+
3
9
  ## 6.0.0-beta.128
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -530,11 +530,33 @@ var RetryError = class extends import_provider15.AISDKError {
530
530
  };
531
531
  _a13 = symbol13;
532
532
 
533
+ // src/util/log-v2-compatibility-warning.ts
534
+ function logV2CompatibilityWarning({
535
+ provider,
536
+ modelId
537
+ }) {
538
+ logWarnings({
539
+ warnings: [
540
+ {
541
+ type: "compatibility",
542
+ feature: "specificationVersion",
543
+ details: `Using v2 specification compatibility mode. Some features may not be available.`
544
+ }
545
+ ],
546
+ provider,
547
+ model: modelId
548
+ });
549
+ }
550
+
533
551
  // src/model/as-embedding-model-v3.ts
534
552
  function asEmbeddingModelV3(model) {
535
553
  if (model.specificationVersion === "v3") {
536
554
  return model;
537
555
  }
556
+ logV2CompatibilityWarning({
557
+ provider: model.provider,
558
+ modelId: model.modelId
559
+ });
538
560
  return new Proxy(model, {
539
561
  get(target, prop) {
540
562
  if (prop === "specificationVersion")
@@ -549,6 +571,10 @@ function asImageModelV3(model) {
549
571
  if (model.specificationVersion === "v3") {
550
572
  return model;
551
573
  }
574
+ logV2CompatibilityWarning({
575
+ provider: model.provider,
576
+ modelId: model.modelId
577
+ });
552
578
  return new Proxy(model, {
553
579
  get(target, prop) {
554
580
  if (prop === "specificationVersion")
@@ -563,6 +589,10 @@ function asLanguageModelV3(model) {
563
589
  if (model.specificationVersion === "v3") {
564
590
  return model;
565
591
  }
592
+ logV2CompatibilityWarning({
593
+ provider: model.provider,
594
+ modelId: model.modelId
595
+ });
566
596
  return new Proxy(model, {
567
597
  get(target, prop) {
568
598
  if (prop === "specificationVersion")
@@ -577,6 +607,10 @@ function asSpeechModelV3(model) {
577
607
  if (model.specificationVersion === "v3") {
578
608
  return model;
579
609
  }
610
+ logV2CompatibilityWarning({
611
+ provider: model.provider,
612
+ modelId: model.modelId
613
+ });
580
614
  return new Proxy(model, {
581
615
  get(target, prop) {
582
616
  if (prop === "specificationVersion")
@@ -591,6 +625,10 @@ function asTranscriptionModelV3(model) {
591
625
  if (model.specificationVersion === "v3") {
592
626
  return model;
593
627
  }
628
+ logV2CompatibilityWarning({
629
+ provider: model.provider,
630
+ modelId: model.modelId
631
+ });
594
632
  return new Proxy(model, {
595
633
  get(target, prop) {
596
634
  if (prop === "specificationVersion")
@@ -870,7 +908,7 @@ function detectMediaType({
870
908
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
871
909
 
872
910
  // src/version.ts
873
- var VERSION = true ? "6.0.0-beta.128" : "0.0.0-test";
911
+ var VERSION = true ? "6.0.0-beta.129" : "0.0.0-test";
874
912
 
875
913
  // src/util/download/download.ts
876
914
  var download = async ({ url }) => {