@ai-sdk/provider 3.0.0-beta.29 → 3.0.0-beta.30
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 +6 -0
- package/dist/index.d.mts +24 -11
- package/dist/index.d.ts +24 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1621,18 +1621,31 @@ type LanguageModelV3ToolResult = {
|
|
|
1621
1621
|
type LanguageModelV3Content = LanguageModelV3Text | LanguageModelV3Reasoning | LanguageModelV3File | LanguageModelV3Source | LanguageModelV3ToolCall | LanguageModelV3ToolResult;
|
|
1622
1622
|
|
|
1623
1623
|
/**
|
|
1624
|
-
Reason why a language model finished generating a response.
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
- `content-filter`: content filter violation stopped the model
|
|
1630
|
-
- `tool-calls`: model triggered tool calls
|
|
1631
|
-
- `error`: model stopped because of an error
|
|
1632
|
-
- `other`: model stopped for other reasons
|
|
1633
|
-
- `unknown`: the model has not transmitted a finish reason
|
|
1624
|
+
* Reason why a language model finished generating a response.
|
|
1625
|
+
*
|
|
1626
|
+
* Contains both a unified finish reason and a raw finish reason from the provider.
|
|
1627
|
+
* The unified finish reason is used to provide a consistent finish reason across different providers.
|
|
1628
|
+
* The raw finish reason is used to provide the original finish reason from the provider.
|
|
1634
1629
|
*/
|
|
1635
|
-
type LanguageModelV3FinishReason =
|
|
1630
|
+
type LanguageModelV3FinishReason = {
|
|
1631
|
+
/**
|
|
1632
|
+
* Unified finish reason. This enables using the same finish reason across different providers.
|
|
1633
|
+
*
|
|
1634
|
+
* Can be one of the following:
|
|
1635
|
+
* - `stop`: model generated stop sequence
|
|
1636
|
+
* - `length`: model generated maximum number of tokens
|
|
1637
|
+
* - `content-filter`: content filter violation stopped the model
|
|
1638
|
+
* - `tool-calls`: model triggered tool calls
|
|
1639
|
+
* - `error`: model stopped because of an error
|
|
1640
|
+
* - `other`: model stopped for other reasons
|
|
1641
|
+
*/
|
|
1642
|
+
unified: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other';
|
|
1643
|
+
/**
|
|
1644
|
+
* Raw finish reason from the provider.
|
|
1645
|
+
* This is the original finish reason from the provider.
|
|
1646
|
+
*/
|
|
1647
|
+
raw: string | undefined;
|
|
1648
|
+
};
|
|
1636
1649
|
|
|
1637
1650
|
interface LanguageModelV3ResponseMetadata {
|
|
1638
1651
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1621,18 +1621,31 @@ type LanguageModelV3ToolResult = {
|
|
|
1621
1621
|
type LanguageModelV3Content = LanguageModelV3Text | LanguageModelV3Reasoning | LanguageModelV3File | LanguageModelV3Source | LanguageModelV3ToolCall | LanguageModelV3ToolResult;
|
|
1622
1622
|
|
|
1623
1623
|
/**
|
|
1624
|
-
Reason why a language model finished generating a response.
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
- `content-filter`: content filter violation stopped the model
|
|
1630
|
-
- `tool-calls`: model triggered tool calls
|
|
1631
|
-
- `error`: model stopped because of an error
|
|
1632
|
-
- `other`: model stopped for other reasons
|
|
1633
|
-
- `unknown`: the model has not transmitted a finish reason
|
|
1624
|
+
* Reason why a language model finished generating a response.
|
|
1625
|
+
*
|
|
1626
|
+
* Contains both a unified finish reason and a raw finish reason from the provider.
|
|
1627
|
+
* The unified finish reason is used to provide a consistent finish reason across different providers.
|
|
1628
|
+
* The raw finish reason is used to provide the original finish reason from the provider.
|
|
1634
1629
|
*/
|
|
1635
|
-
type LanguageModelV3FinishReason =
|
|
1630
|
+
type LanguageModelV3FinishReason = {
|
|
1631
|
+
/**
|
|
1632
|
+
* Unified finish reason. This enables using the same finish reason across different providers.
|
|
1633
|
+
*
|
|
1634
|
+
* Can be one of the following:
|
|
1635
|
+
* - `stop`: model generated stop sequence
|
|
1636
|
+
* - `length`: model generated maximum number of tokens
|
|
1637
|
+
* - `content-filter`: content filter violation stopped the model
|
|
1638
|
+
* - `tool-calls`: model triggered tool calls
|
|
1639
|
+
* - `error`: model stopped because of an error
|
|
1640
|
+
* - `other`: model stopped for other reasons
|
|
1641
|
+
*/
|
|
1642
|
+
unified: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other';
|
|
1643
|
+
/**
|
|
1644
|
+
* Raw finish reason from the provider.
|
|
1645
|
+
* This is the original finish reason from the provider.
|
|
1646
|
+
*/
|
|
1647
|
+
raw: string | undefined;
|
|
1648
|
+
};
|
|
1636
1649
|
|
|
1637
1650
|
interface LanguageModelV3ResponseMetadata {
|
|
1638
1651
|
/**
|