@ai-sdk/provider 2.0.0-canary.3 → 2.0.0-canary.4

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-sdk/provider
2
2
 
3
+ ## 2.0.0-canary.4
4
+
5
+ ### Major Changes
6
+
7
+ - 6f6bb89: chore (provider): cleanup request and rawRequest (language model v2)
8
+
3
9
  ## 2.0.0-canary.3
4
10
 
5
11
  ### Major Changes
package/dist/index.d.mts CHANGED
@@ -1847,29 +1847,13 @@ An optional signature for verifying that the reasoning originated from the model
1847
1847
  completionTokens: number;
1848
1848
  };
1849
1849
  /**
1850
- Raw prompt and setting information for observability provider integration.
1851
- */
1852
- rawCall: {
1853
- /**
1854
- Raw prompt after expansion and conversion to the format that the
1855
- provider uses to send the information to their API.
1856
- */
1857
- rawPrompt: unknown;
1858
- /**
1859
- Raw settings that are used for the API call. Includes provider-specific
1860
- settings.
1861
- */
1862
- rawSettings: Record<string, unknown>;
1863
- };
1864
- /**
1865
1850
  Optional request information for telemetry and debugging purposes.
1866
1851
  */
1867
1852
  request?: {
1868
1853
  /**
1869
- Raw request HTTP body that was sent to the provider API as a string (JSON should be stringified).
1870
- Non-HTTP(s) providers should not set this.
1854
+ Request HTTP body that was sent to the provider API.
1871
1855
  */
1872
- body?: string;
1856
+ body?: unknown;
1873
1857
  };
1874
1858
  /**
1875
1859
  Optional response information for telemetry and debugging purposes.
@@ -1892,7 +1876,7 @@ An optional signature for verifying that the reasoning originated from the model
1892
1876
  */
1893
1877
  headers?: Record<string, string>;
1894
1878
  /**
1895
- Response body.
1879
+ Response HTTP body.
1896
1880
  */
1897
1881
  body?: unknown;
1898
1882
  };
@@ -1926,19 +1910,13 @@ An optional signature for verifying that the reasoning originated from the model
1926
1910
  doStream(options: LanguageModelV2CallOptions): PromiseLike<{
1927
1911
  stream: ReadableStream<LanguageModelV2StreamPart>;
1928
1912
  /**
1929
- Raw prompt and setting information for observability provider integration.
1913
+ Optional request information for telemetry and debugging purposes.
1930
1914
  */
1931
- rawCall: {
1932
- /**
1933
- Raw prompt after expansion and conversion to the format that the
1934
- provider uses to send the information to their API.
1935
- */
1936
- rawPrompt: unknown;
1915
+ request?: {
1937
1916
  /**
1938
- Raw settings that are used for the API call. Includes provider-specific
1939
- settings.
1940
- */
1941
- rawSettings: Record<string, unknown>;
1917
+ Request HTTP body that was sent to the provider API.
1918
+ */
1919
+ body?: unknown;
1942
1920
  };
1943
1921
  /**
1944
1922
  Optional raw response data.
@@ -1950,16 +1928,6 @@ An optional signature for verifying that the reasoning originated from the model
1950
1928
  headers?: Record<string, string>;
1951
1929
  };
1952
1930
  /**
1953
- Optional request information for telemetry and debugging purposes.
1954
- */
1955
- request?: {
1956
- /**
1957
- Raw request HTTP body that was sent to the provider API as a string (JSON should be stringified).
1958
- Non-HTTP(s) providers should not set this.
1959
- */
1960
- body?: string;
1961
- };
1962
- /**
1963
1931
  Warnings for the call, e.g. unsupported settings.
1964
1932
  */
1965
1933
  warnings?: Array<LanguageModelV2CallWarning>;
package/dist/index.d.ts CHANGED
@@ -1847,29 +1847,13 @@ An optional signature for verifying that the reasoning originated from the model
1847
1847
  completionTokens: number;
1848
1848
  };
1849
1849
  /**
1850
- Raw prompt and setting information for observability provider integration.
1851
- */
1852
- rawCall: {
1853
- /**
1854
- Raw prompt after expansion and conversion to the format that the
1855
- provider uses to send the information to their API.
1856
- */
1857
- rawPrompt: unknown;
1858
- /**
1859
- Raw settings that are used for the API call. Includes provider-specific
1860
- settings.
1861
- */
1862
- rawSettings: Record<string, unknown>;
1863
- };
1864
- /**
1865
1850
  Optional request information for telemetry and debugging purposes.
1866
1851
  */
1867
1852
  request?: {
1868
1853
  /**
1869
- Raw request HTTP body that was sent to the provider API as a string (JSON should be stringified).
1870
- Non-HTTP(s) providers should not set this.
1854
+ Request HTTP body that was sent to the provider API.
1871
1855
  */
1872
- body?: string;
1856
+ body?: unknown;
1873
1857
  };
1874
1858
  /**
1875
1859
  Optional response information for telemetry and debugging purposes.
@@ -1892,7 +1876,7 @@ An optional signature for verifying that the reasoning originated from the model
1892
1876
  */
1893
1877
  headers?: Record<string, string>;
1894
1878
  /**
1895
- Response body.
1879
+ Response HTTP body.
1896
1880
  */
1897
1881
  body?: unknown;
1898
1882
  };
@@ -1926,19 +1910,13 @@ An optional signature for verifying that the reasoning originated from the model
1926
1910
  doStream(options: LanguageModelV2CallOptions): PromiseLike<{
1927
1911
  stream: ReadableStream<LanguageModelV2StreamPart>;
1928
1912
  /**
1929
- Raw prompt and setting information for observability provider integration.
1913
+ Optional request information for telemetry and debugging purposes.
1930
1914
  */
1931
- rawCall: {
1932
- /**
1933
- Raw prompt after expansion and conversion to the format that the
1934
- provider uses to send the information to their API.
1935
- */
1936
- rawPrompt: unknown;
1915
+ request?: {
1937
1916
  /**
1938
- Raw settings that are used for the API call. Includes provider-specific
1939
- settings.
1940
- */
1941
- rawSettings: Record<string, unknown>;
1917
+ Request HTTP body that was sent to the provider API.
1918
+ */
1919
+ body?: unknown;
1942
1920
  };
1943
1921
  /**
1944
1922
  Optional raw response data.
@@ -1950,16 +1928,6 @@ An optional signature for verifying that the reasoning originated from the model
1950
1928
  headers?: Record<string, string>;
1951
1929
  };
1952
1930
  /**
1953
- Optional request information for telemetry and debugging purposes.
1954
- */
1955
- request?: {
1956
- /**
1957
- Raw request HTTP body that was sent to the provider API as a string (JSON should be stringified).
1958
- Non-HTTP(s) providers should not set this.
1959
- */
1960
- body?: string;
1961
- };
1962
- /**
1963
1931
  Warnings for the call, e.g. unsupported settings.
1964
1932
  */
1965
1933
  warnings?: Array<LanguageModelV2CallWarning>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "2.0.0-canary.3",
3
+ "version": "2.0.0-canary.4",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -46,11 +46,11 @@
46
46
  "ai"
47
47
  ],
48
48
  "scripts": {
49
- "build": "tsup",
50
- "build:watch": "tsup --watch",
51
- "clean": "rm -rf dist",
49
+ "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
50
+ "build:watch": "pnpm clean && tsup --watch",
51
+ "clean": "rm -rf dist *.tsbuildinfo",
52
52
  "lint": "eslint \"./**/*.ts*\"",
53
- "type-check": "tsc --noEmit",
53
+ "type-check": "tsc --build",
54
54
  "prettier-check": "prettier --check \"./**/*.ts*\""
55
55
  }
56
56
  }