@effect/ai-openai-compat 4.0.3 → 4.0.5

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.
@@ -230,7 +230,7 @@ export const mapStatusCodeToReason = ({ status, headers, message, metadata, http
230
230
  case 400:
231
231
  return new AiError.InvalidRequestError({
232
232
  description: errorDescription,
233
- metadata: { openai: metadata },
233
+ metadata: { "openai-compat": metadata },
234
234
  http
235
235
  })
236
236
  case 401:
@@ -250,14 +250,14 @@ export const mapStatusCodeToReason = ({ status, headers, message, metadata, http
250
250
  case 404:
251
251
  return new AiError.InvalidRequestError({
252
252
  description: errorDescription,
253
- metadata: { openai: metadata },
253
+ metadata: { "openai-compat": metadata },
254
254
  http
255
255
  })
256
256
  case 409:
257
257
  case 422:
258
258
  return new AiError.InvalidRequestError({
259
259
  description: errorDescription,
260
- metadata: { openai: metadata },
260
+ metadata: { "openai-compat": metadata },
261
261
  http
262
262
  })
263
263
  case 429: {
@@ -268,7 +268,7 @@ export const mapStatusCodeToReason = ({ status, headers, message, metadata, http
268
268
  metadata.errorType?.includes("exhausted")
269
269
  ) {
270
270
  return new AiError.QuotaExhaustedError({
271
- metadata: { openai: metadata },
271
+ metadata: { "openai-compat": metadata },
272
272
  http
273
273
  })
274
274
  }
@@ -276,7 +276,7 @@ export const mapStatusCodeToReason = ({ status, headers, message, metadata, http
276
276
  return new AiError.RateLimitError({
277
277
  retryAfter,
278
278
  metadata: {
279
- openai: {
279
+ "openai-compat": {
280
280
  ...metadata,
281
281
  ...rateLimitMetadata
282
282
  }