@ai-sdk/azure 3.0.21 → 3.0.23

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,19 @@
1
1
  # @ai-sdk/azure
2
2
 
3
+ ## 3.0.23
4
+
5
+ ### Patch Changes
6
+
7
+ - 1524271: chore: add skill information to README files
8
+ - Updated dependencies [1524271]
9
+ - @ai-sdk/openai@3.0.22
10
+
11
+ ## 3.0.22
12
+
13
+ ### Patch Changes
14
+
15
+ - 3988c08: docs: fix incorrect and outdated provider docs
16
+
3
17
  ## 3.0.21
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -10,6 +10,14 @@ The Azure provider is available in the `@ai-sdk/azure` module. You can install i
10
10
  npm i @ai-sdk/azure
11
11
  ```
12
12
 
13
+ ## Skill for Coding Agents
14
+
15
+ If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:
16
+
17
+ ```shell
18
+ npx skills add vercel/ai
19
+ ```
20
+
13
21
  ## Provider Instance
14
22
 
15
23
  You can import the default provider instance `azure` from `@ai-sdk/azure`:
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ var azureOpenaiTools = {
40
40
  };
41
41
 
42
42
  // src/version.ts
43
- var VERSION = true ? "3.0.21" : "0.0.0-test";
43
+ var VERSION = true ? "3.0.23" : "0.0.0-test";
44
44
 
45
45
  // src/azure-openai-provider.ts
46
46
  function createAzure(options = {}) {
package/dist/index.mjs CHANGED
@@ -29,7 +29,7 @@ var azureOpenaiTools = {
29
29
  };
30
30
 
31
31
  // src/version.ts
32
- var VERSION = true ? "3.0.21" : "0.0.0-test";
32
+ var VERSION = true ? "3.0.23" : "0.0.0-test";
33
33
 
34
34
  // src/azure-openai-provider.ts
35
35
  function createAzure(options = {}) {
package/docs/04-azure.mdx CHANGED
@@ -1029,3 +1029,67 @@ The following provider options are available:
1029
1029
  | `whisper-1` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
1030
1030
  | `gpt-4o-mini-transcribe` | <Check size={18} /> | <Cross size={18} /> | <Cross size={18} /> | <Cross size={18} /> |
1031
1031
  | `gpt-4o-transcribe` | <Check size={18} /> | <Cross size={18} /> | <Cross size={18} /> | <Cross size={18} /> |
1032
+
1033
+ ## Speech Models
1034
+
1035
+ You can create models that call the Azure OpenAI speech API using the `.speech()` factory method.
1036
+
1037
+ The first argument is your deployment name for the text-to-speech model (e.g., `tts-1`).
1038
+
1039
+ ```ts
1040
+ const model = azure.speech('your-tts-deployment-name');
1041
+ ```
1042
+
1043
+ ### Example
1044
+
1045
+ ```ts
1046
+ import { azure } from '@ai-sdk/azure';
1047
+ import { experimental_generateSpeech as generateSpeech } from 'ai';
1048
+
1049
+ const result = await generateSpeech({
1050
+ model: azure.speech('your-tts-deployment-name'),
1051
+ text: 'Hello, world!',
1052
+ voice: 'alloy', // OpenAI voice ID
1053
+ });
1054
+ ```
1055
+
1056
+ You can also pass additional provider-specific options using the `providerOptions` argument:
1057
+
1058
+ ```ts
1059
+ import { azure } from '@ai-sdk/azure';
1060
+ import { experimental_generateSpeech as generateSpeech } from 'ai';
1061
+
1062
+ const result = await generateSpeech({
1063
+ model: azure.speech('your-tts-deployment-name'),
1064
+ text: 'Hello, world!',
1065
+ voice: 'alloy',
1066
+ providerOptions: {
1067
+ openai: {
1068
+ speed: 1.2,
1069
+ },
1070
+ },
1071
+ });
1072
+ ```
1073
+
1074
+ The following provider options are available:
1075
+
1076
+ - **instructions** _string_
1077
+ Control the voice of your generated audio with additional instructions e.g. "Speak in a slow and steady tone".
1078
+ Does not work with `tts-1` or `tts-1-hd`.
1079
+ Optional.
1080
+
1081
+ - **speed** _number_
1082
+ The speed of the generated audio.
1083
+ Select a value from 0.25 to 4.0.
1084
+ Defaults to 1.0.
1085
+ Optional.
1086
+
1087
+ ### Model Capabilities
1088
+
1089
+ Azure OpenAI supports TTS models through deployments. The capabilities depend on which model version your deployment is using:
1090
+
1091
+ | Model Version | Instructions |
1092
+ | ----------------- | ------------------- |
1093
+ | `tts-1` | <Cross size={18} /> |
1094
+ | `tts-1-hd` | <Cross size={18} /> |
1095
+ | `gpt-4o-mini-tts` | <Check size={18} /> |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/azure",
3
- "version": "3.0.21",
3
+ "version": "3.0.23",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -29,9 +29,9 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@ai-sdk/openai": "3.0.21",
33
32
  "@ai-sdk/provider": "3.0.5",
34
- "@ai-sdk/provider-utils": "4.0.10"
33
+ "@ai-sdk/provider-utils": "4.0.10",
34
+ "@ai-sdk/openai": "3.0.22"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "20.17.24",