@byte_fluffy/nexra-sdk 0.1.0-alpha.53 → 0.1.0-alpha.54

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.
@@ -12,7 +12,7 @@ import {
12
12
  parseServerSentEvents,
13
13
  queryString,
14
14
  sleep
15
- } from "./chunk-LWJWWD7Z.js";
15
+ } from "./chunk-MLDFBO2A.js";
16
16
  import {
17
17
  ASR_MAX_FRAME_BYTES,
18
18
  ORGANIZATION_HEADER,
@@ -22,7 +22,7 @@ import {
22
22
  encodeVolcengineAsrFrame,
23
23
  isTerminalTaskStatus,
24
24
  volcengineAsrFrameJson
25
- } from "./chunk-V3F6VPMP.js";
25
+ } from "./chunk-IOGCXMW3.js";
26
26
 
27
27
  // src/assets.ts
28
28
  var AssetsClient = class {
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, M as MEDIA_KINDS, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-IaOdOMQC.js';
2
- import { H as HttpTransport, j as ModelSearchParams, v as TaskModelSummary, T as TaskModel, i as ModelSchema, g as ModelResourceList, N as NexraClientOptions } from './media-geometry-B92BvuQL.js';
3
- export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, h as ModelResourceOption, k as NexraBillingCurrency, l as NexraCatalogRevision, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-B92BvuQL.js';
2
+ import { H as HttpTransport, j as ModelSearchParams, v as TaskModelSummary, T as TaskModel, i as ModelSchema, g as ModelResourceList, N as NexraClientOptions } from './media-geometry-z7fXaDSN.js';
3
+ export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, h as ModelResourceOption, k as NexraBillingCurrency, l as NexraCatalogRevision, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-z7fXaDSN.js';
4
4
  import { C as CursorPage, b as JsonValue } from './json-dnsDzk-s.js';
5
5
  export { J as JsonObject, a as JsonPrimitive } from './json-dnsDzk-s.js';
6
6
  import { N as NexraError, b as PublicErrorFields } from './errors-BXPUVOh7.js';
7
7
  export { A as ApiErrorPayload, P as PublicError, a as PublicErrorContext, e as extractUpstreamErrorMessage } from './errors-BXPUVOh7.js';
8
- import { x as Voice, b as CreateVoiceRequest, y as VoiceCreation, A as AssetsClient, r as TasksClient, t as TranscriptionClient, E as TranscriptionSocketFactory, d as RunTaskOptions, c as RunResult, e as TaskResult } from './voices-Dc94LfyS.js';
9
- export { C as CreateTaskOptions, a as CreateTaskRequest, N as NexraTranscriptionError, R as RequestDetails, T as TASK_STATUSES, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, s as TerminalTaskStatus, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, W as WaitTaskOptions, z as WatchTaskOptions, B as isTerminalTaskStatus, D as verifyWebhook } from './voices-Dc94LfyS.js';
8
+ import { x as Voice, b as CreateVoiceRequest, y as VoiceCreation, A as AssetsClient, r as TasksClient, t as TranscriptionClient, E as TranscriptionSocketFactory, d as RunTaskOptions, c as RunResult, e as TaskResult } from './voices-BrCaiHnb.js';
9
+ export { C as CreateTaskOptions, a as CreateTaskRequest, N as NexraTranscriptionError, R as RequestDetails, T as TASK_STATUSES, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, s as TerminalTaskStatus, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, W as WaitTaskOptions, z as WatchTaskOptions, B as isTerminalTaskStatus, D as verifyWebhook } from './voices-BrCaiHnb.js';
10
10
  import { CatalogClient } from './catalog.js';
11
11
  export { formatModelDisplayName, getModelSpec, listModelSpecs } from './catalog.js';
12
12
  export { ceilDecimal, multiplyDecimal } from './decimal.js';
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  VoicesClient,
9
9
  createNexra,
10
10
  verifyWebhook
11
- } from "./chunk-RBKLCJ3H.js";
11
+ } from "./chunk-ZTRVMQMH.js";
12
12
  import {
13
13
  ceilDecimal,
14
14
  multiplyDecimal
@@ -25,13 +25,13 @@ import {
25
25
  getModelSpec,
26
26
  listModelSpecs,
27
27
  projectMediaGeometry
28
- } from "./chunk-LWJWWD7Z.js";
28
+ } from "./chunk-MLDFBO2A.js";
29
29
  import {
30
30
  MEDIA_KINDS,
31
31
  TASK_STATUSES,
32
32
  extractUpstreamErrorMessage,
33
33
  isTerminalTaskStatus
34
- } from "./chunk-V3F6VPMP.js";
34
+ } from "./chunk-IOGCXMW3.js";
35
35
  export {
36
36
  AssetsClient,
37
37
  CatalogClient,
@@ -1,7 +1,7 @@
1
1
  import { APICallError, LanguageModelV4 } from '@ai-sdk/provider';
2
2
  import { NexraLanguageProtocol } from './catalog.js';
3
3
  export { NexraLanguageModelBinding } from './catalog.js';
4
- import { F as FetchLike } from './media-geometry-B92BvuQL.js';
4
+ import { F as FetchLike } from './media-geometry-z7fXaDSN.js';
5
5
  import { N as NexraError } from './errors-BXPUVOh7.js';
6
6
  import './json-dnsDzk-s.js';
7
7
 
package/dist/language.js CHANGED
@@ -6,12 +6,12 @@ import {
6
6
  jsonBody,
7
7
  parseServerSentEvents,
8
8
  resolveNexraLanguageReasoning
9
- } from "./chunk-LWJWWD7Z.js";
9
+ } from "./chunk-MLDFBO2A.js";
10
10
  import {
11
11
  isPublicErrorCode,
12
12
  publicErrorMessage,
13
13
  resolvePublicErrorLocale
14
- } from "./chunk-V3F6VPMP.js";
14
+ } from "./chunk-IOGCXMW3.js";
15
15
 
16
16
  // src/language/index.ts
17
17
  import { createAnthropic } from "@ai-sdk/anthropic";
@@ -241,6 +241,40 @@ var NexraNativeError = class extends APICallError {
241
241
  return this.statusCode;
242
242
  }
243
243
  };
244
+ function restoreNativeError(error) {
245
+ const seen = /* @__PURE__ */ new Set();
246
+ let current = error;
247
+ while (current instanceof Error && !seen.has(current)) {
248
+ if (current instanceof NexraNativeError) return current;
249
+ seen.add(current);
250
+ current = current.cause;
251
+ }
252
+ return error;
253
+ }
254
+ function restoreNativeStreamErrors(stream) {
255
+ const reader = stream.getReader();
256
+ return new ReadableStream({
257
+ async pull(controller) {
258
+ try {
259
+ const { value, done } = await reader.read();
260
+ if (done) {
261
+ reader.releaseLock();
262
+ controller.close();
263
+ } else controller.enqueue(value);
264
+ } catch (error) {
265
+ reader.releaseLock();
266
+ controller.error(restoreNativeError(error));
267
+ }
268
+ },
269
+ async cancel(reason) {
270
+ try {
271
+ await reader.cancel(reason);
272
+ } finally {
273
+ reader.releaseLock();
274
+ }
275
+ }
276
+ }, { highWaterMark: 0 });
277
+ }
244
278
  function createNexraNativeFetch(options = {}) {
245
279
  const fetch = options.fetch ?? globalThis.fetch.bind(globalThis);
246
280
  return async (input, init) => {
@@ -658,7 +692,9 @@ function withNativeContract(model, binding) {
658
692
  modelId: model.modelId,
659
693
  supportedUrls: model.supportedUrls,
660
694
  async doGenerate(options) {
661
- const result = await model.doGenerate(prepare(options, binding, false));
695
+ const result = await Promise.resolve(model.doGenerate(prepare(options, binding, false))).catch((error) => {
696
+ throw restoreNativeError(error);
697
+ });
662
698
  const raw = nativeUsage(binding.endpoint.protocol, result.response?.body);
663
699
  return {
664
700
  ...result,
@@ -668,7 +704,9 @@ function withNativeContract(model, binding) {
668
704
  },
669
705
  async doStream(options) {
670
706
  if (!binding.supportsStreaming) throw new Error(`Nexra model does not support streaming: ${binding.spec.id}`);
671
- const result = await model.doStream({ ...prepare(options, binding, true), includeRawChunks: true });
707
+ const result = await Promise.resolve(model.doStream({ ...prepare(options, binding, true), includeRawChunks: true })).catch((error) => {
708
+ throw restoreNativeError(error);
709
+ });
672
710
  let raw;
673
711
  let terminal = false;
674
712
  let failed = false;
@@ -678,7 +716,7 @@ function withNativeContract(model, binding) {
678
716
  return {
679
717
  ...result,
680
718
  request: nativeRequest(binding, result.request, true),
681
- stream: result.stream.pipeThrough(new TransformStream({
719
+ stream: restoreNativeStreamErrors(result.stream).pipeThrough(new TransformStream({
682
720
  transform(part, controller) {
683
721
  if (part.type === "raw") {
684
722
  const payload = object3(part.rawValue);
@@ -688,7 +726,10 @@ function withNativeContract(model, binding) {
688
726
  if (options.includeRawChunks) controller.enqueue(part);
689
727
  } else if (part.type === "finish") finish = part;
690
728
  else {
691
- if (part.type === "error") failed = true;
729
+ if (part.type === "error") {
730
+ failed = true;
731
+ part = { ...part, error: restoreNativeError(part.error) };
732
+ }
692
733
  if (part.type === "text-start" || part.type === "text-delta" || part.type === "text-end" || part.type === "reasoning-start" || part.type === "reasoning-delta" || part.type === "reasoning-end") {
693
734
  const metadata = part.type.startsWith("text-") ? textMetadata : reasoningMetadata2;
694
735
  if (part.providerMetadata) metadata.set(part.id, mergeRecords(metadata.get(part.id), part.providerMetadata));
@@ -90,6 +90,8 @@ interface TaskModelSummary {
90
90
  end: string;
91
91
  succeeded: number;
92
92
  total: number;
93
+ attemptSucceeded?: number;
94
+ attemptTotal?: number;
93
95
  }[];
94
96
  id: string;
95
97
  slug: string;
package/dist/media.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  nexraMediaInputSchema,
11
11
  nexraMediaInputSchemaForMode,
12
12
  nexraMediaOperationForMode
13
- } from "./chunk-V3F6VPMP.js";
13
+ } from "./chunk-IOGCXMW3.js";
14
14
  export {
15
15
  NEXRA_GENERATION_OPERATIONS,
16
16
  NEXRA_MEDIA_API_VERSION,
package/dist/node.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, M as MEDIA_KINDS, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-IaOdOMQC.js';
2
- import { N as NexraClientOptions } from './media-geometry-B92BvuQL.js';
3
- export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, g as ModelResourceList, h as ModelResourceOption, i as ModelSchema, j as ModelSearchParams, k as NexraBillingCurrency, l as NexraCatalogRevision, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, T as TaskModel, v as TaskModelSummary, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-B92BvuQL.js';
2
+ import { N as NexraClientOptions } from './media-geometry-z7fXaDSN.js';
3
+ export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, g as ModelResourceList, h as ModelResourceOption, i as ModelSchema, j as ModelSearchParams, k as NexraBillingCurrency, l as NexraCatalogRevision, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, T as TaskModel, v as TaskModelSummary, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-z7fXaDSN.js';
4
4
  export { C as CursorPage, J as JsonObject, a as JsonPrimitive, b as JsonValue } from './json-dnsDzk-s.js';
5
5
  export { A as ApiErrorPayload, N as NexraError, P as PublicError, a as PublicErrorContext, b as PublicErrorFields, e as extractUpstreamErrorMessage } from './errors-BXPUVOh7.js';
6
- export { A as AssetsClient, C as CreateTaskOptions, a as CreateTaskRequest, b as CreateVoiceRequest, N as NexraTranscriptionError, R as RequestDetails, c as RunResult, d as RunTaskOptions, T as TASK_STATUSES, e as Task, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, e as TaskResult, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, r as TasksClient, s as TerminalTaskStatus, t as TranscriptionClient, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, x as Voice, y as VoiceCreation, W as WaitTaskOptions, z as WatchTaskOptions, B as isTerminalTaskStatus, D as verifyWebhook } from './voices-Dc94LfyS.js';
6
+ export { A as AssetsClient, C as CreateTaskOptions, a as CreateTaskRequest, b as CreateVoiceRequest, N as NexraTranscriptionError, R as RequestDetails, c as RunResult, d as RunTaskOptions, T as TASK_STATUSES, e as Task, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, e as TaskResult, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, r as TasksClient, s as TerminalTaskStatus, t as TranscriptionClient, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, x as Voice, y as VoiceCreation, W as WaitTaskOptions, z as WatchTaskOptions, B as isTerminalTaskStatus, D as verifyWebhook } from './voices-BrCaiHnb.js';
7
7
  export { CatalogClient, formatModelDisplayName, getModelSpec, listModelSpecs } from './catalog.js';
8
8
  import { NexraClient as NexraClient$1 } from './index.js';
9
9
  export { CreateVoiceOptions, ModelsClient, NexraApiError, NexraTaskError, NexraWaitTimeoutError, VoicesClient } from './index.js';
package/dist/node.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  TranscriptionClient,
8
8
  VoicesClient,
9
9
  verifyWebhook
10
- } from "./chunk-RBKLCJ3H.js";
10
+ } from "./chunk-ZTRVMQMH.js";
11
11
  import {
12
12
  ceilDecimal,
13
13
  multiplyDecimal
@@ -24,14 +24,14 @@ import {
24
24
  getModelSpec,
25
25
  listModelSpecs,
26
26
  projectMediaGeometry
27
- } from "./chunk-LWJWWD7Z.js";
27
+ } from "./chunk-MLDFBO2A.js";
28
28
  import {
29
29
  ASR_MAX_FRAME_BYTES,
30
30
  MEDIA_KINDS,
31
31
  TASK_STATUSES,
32
32
  extractUpstreamErrorMessage,
33
33
  isTerminalTaskStatus
34
- } from "./chunk-V3F6VPMP.js";
34
+ } from "./chunk-IOGCXMW3.js";
35
35
 
36
36
  // src/node.ts
37
37
  import WebSocket from "ws";
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-IaOdOMQC.js';
2
- export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, g as ModelResourceList, h as ModelResourceOption, i as ModelSchema, j as ModelSearchParams, k as NexraBillingCurrency, l as NexraCatalogRevision, N as NexraClientOptions, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, T as TaskModel, v as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-B92BvuQL.js';
2
+ export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, g as ModelResourceList, h as ModelResourceOption, i as ModelSchema, j as ModelSearchParams, k as NexraBillingCurrency, l as NexraCatalogRevision, N as NexraClientOptions, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, T as TaskModel, v as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-z7fXaDSN.js';
3
3
  export { C as CursorPage, J as JsonObject, a as JsonPrimitive, b as JsonValue } from './json-dnsDzk-s.js';
4
4
  export { A as ApiErrorPayload, N as NexraError, P as PublicError, a as PublicErrorContext, b as PublicErrorFields } from './errors-BXPUVOh7.js';
5
- export { C as CreateTaskOptions, a as CreateTaskRequest, b as CreateVoiceRequest, R as RequestDetails, c as RunResult, d as RunTaskOptions, e as Task, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, e as TaskResult, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, s as TerminalTaskStatus, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, x as Voice, y as VoiceCreation, W as WaitTaskOptions, z as WatchTaskOptions } from './voices-Dc94LfyS.js';
5
+ export { C as CreateTaskOptions, a as CreateTaskRequest, b as CreateVoiceRequest, R as RequestDetails, c as RunResult, d as RunTaskOptions, e as Task, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, e as TaskResult, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, s as TerminalTaskStatus, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, x as Voice, y as VoiceCreation, W as WaitTaskOptions, z as WatchTaskOptions } from './voices-BrCaiHnb.js';
@@ -1,5 +1,5 @@
1
1
  import { c as AssetUploadOptions, d as MediaAsset, A as AssetImportRequest, h as AssetCertificationRequest, i as AssetCertification, j as AssetCertificationWaitOptions } from './media-IaOdOMQC.js';
2
- import { H as HttpTransport, u as NexraSettlement } from './media-geometry-B92BvuQL.js';
2
+ import { H as HttpTransport, u as NexraSettlement } from './media-geometry-z7fXaDSN.js';
3
3
  import { J as JsonObject, b as JsonValue, C as CursorPage } from './json-dnsDzk-s.js';
4
4
  import { b as PublicErrorFields, P as PublicError, a as PublicErrorContext, N as NexraError } from './errors-BXPUVOh7.js';
5
5
 
@@ -242,7 +242,18 @@ type TaskReceipt = Pick<Task, "id" | "status"> & PublicErrorContext;
242
242
  /** Public Task result; platform diagnostics and business tags live in RequestDetails. */
243
243
  type TaskResult<TOutput = JsonValue> = Pick<Task<TOutput>, "id" | "model" | "status"> & Partial<Pick<Task<TOutput>, "output" | "assets" | "persistPolicy" | "deliveryStatus" | "settlement" | "queue">> & PublicErrorFields;
244
244
  /** Platform request details, used by both managed Tasks and native proxy requests. */
245
+ /** Recorded execution only; never inferred from the current model catalog. */
246
+ interface LanguageRequestExecution {
247
+ isStream: boolean;
248
+ attempts: ReadonlyArray<Readonly<{
249
+ requestId?: string;
250
+ attempt: number;
251
+ strategy: "passthrough" | "bridge";
252
+ upstreamProtocol: string;
253
+ }>>;
254
+ }
245
255
  interface RequestDetails extends PublicErrorFields {
256
+ execution?: LanguageRequestExecution;
246
257
  id: string;
247
258
  /** Owning Nexra account, used to separate users in system request history. */
248
259
  accountId?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byte_fluffy/nexra-sdk",
3
- "version": "0.1.0-alpha.53",
3
+ "version": "0.1.0-alpha.54",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "sideEffects": false,
@@ -57,10 +57,10 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@ai-sdk/anthropic": "4.0.30",
60
- "@ai-sdk/google": "4.0.12",
60
+ "@ai-sdk/google": "4.0.119",
61
61
  "@ai-sdk/openai": "4.0.11",
62
- "@ai-sdk/provider": "4.0.2",
63
- "@ai-sdk/provider-utils": "5.0.21",
62
+ "@ai-sdk/provider": "4.0.38",
63
+ "@ai-sdk/provider-utils": "5.0.80",
64
64
  "@nexra/contracts": "workspace:*",
65
65
  "@nexra/models": "workspace:*",
66
66
  "@types/ws": "8.18.2",
@@ -69,10 +69,10 @@
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@ai-sdk/anthropic": "^4.0.30",
72
- "@ai-sdk/google": "^4.0.12",
72
+ "@ai-sdk/google": "^4.0.119",
73
73
  "@ai-sdk/openai": "^4.0.11",
74
- "@ai-sdk/provider": "^4.0.2",
75
- "@ai-sdk/provider-utils": "^5.0.21"
74
+ "@ai-sdk/provider": "^4.0.38",
75
+ "@ai-sdk/provider-utils": "^5.0.80"
76
76
  },
77
77
  "peerDependenciesMeta": {
78
78
  "@ai-sdk/anthropic": {
File without changes