@ai-sdk/harness 1.0.0-beta.15 → 1.0.0-beta.17

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,17 @@
1
1
  # @ai-sdk/harness
2
2
 
3
+ ## 1.0.0-beta.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 534dac6: fix(harness): fix incomplete OIDC token support for AI Gateway auth in harness adapters
8
+
9
+ ## 1.0.0-beta.16
10
+
11
+ ### Patch Changes
12
+
13
+ - ai@7.0.0-beta.179
14
+
3
15
  ## 1.0.0-beta.15
4
16
 
5
17
  ### Patch Changes
@@ -193,6 +193,13 @@ type DiskLogRecoveryMode = 'replay' | 'rerun';
193
193
  */
194
194
  declare function classifyDiskLog(eventLog: string | null | undefined): Promise<DiskLogRecoveryMode>;
195
195
 
196
+ declare function getAiGatewayAuthFromEnv({ env, }: {
197
+ env: Record<string, string | undefined>;
198
+ }): {
199
+ apiKey: string | undefined;
200
+ baseUrl: string;
201
+ };
202
+
196
203
  type BridgeReadySource = 'stdout' | 'metadata';
197
204
  type BridgeReadyErrorContext = {
198
205
  proc: Experimental_SandboxProcess;
@@ -222,4 +229,4 @@ declare function markBridgeStarting({ sandbox, bridgeStateDir, bridgeType, abort
222
229
  }): Promise<void>;
223
230
  declare function waitForBridgeReady({ proc, sandbox, bridgeStateDir, bridgeType, timeoutMs, abortSignal, pollIntervalMs, createTimeoutError, createExitError, }: WaitForBridgeReadyOptions): Promise<WaitForBridgeReadyResult>;
224
231
 
225
- export { type BridgeReadyErrorContext, type BridgeReadySource, type DiskLogRecoveryMode, SandboxChannel, type SandboxChannelDebugEvent, type SandboxChannelOptions, type SandboxChannelReconnectOptions, type WaitForBridgeReadyOptions, type WaitForBridgeReadyResult, classifyDiskLog, markBridgeStarting, waitForBridgeReady };
232
+ export { type BridgeReadyErrorContext, type BridgeReadySource, type DiskLogRecoveryMode, SandboxChannel, type SandboxChannelDebugEvent, type SandboxChannelOptions, type SandboxChannelReconnectOptions, type WaitForBridgeReadyOptions, type WaitForBridgeReadyResult, classifyDiskLog, getAiGatewayAuthFromEnv, markBridgeStarting, waitForBridgeReady };
@@ -327,6 +327,18 @@ async function classifyDiskLog(eventLog) {
327
327
  return "rerun";
328
328
  }
329
329
 
330
+ // src/utils/ai-gateway-auth.ts
331
+ var DEFAULT_AI_GATEWAY_BASE_URL = "https://ai-gateway.vercel.sh";
332
+ function getAiGatewayAuthFromEnv({
333
+ env
334
+ }) {
335
+ var _a;
336
+ return {
337
+ apiKey: env.AI_GATEWAY_API_KEY || env.VERCEL_OIDC_TOKEN || void 0,
338
+ baseUrl: (_a = env.AI_GATEWAY_BASE_URL) != null ? _a : DEFAULT_AI_GATEWAY_BASE_URL
339
+ };
340
+ }
341
+
330
342
  // src/utils/bridge-ready.ts
331
343
  import {
332
344
  safeParseJSON as safeParseJSON3
@@ -12142,6 +12154,7 @@ function lineDecoder() {
12142
12154
  export {
12143
12155
  SandboxChannel,
12144
12156
  classifyDiskLog,
12157
+ getAiGatewayAuthFromEnv,
12145
12158
  markBridgeStarting,
12146
12159
  waitForBridgeReady
12147
12160
  };