@core-ai/mistral 0.7.1 → 0.8.0

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -516,9 +516,13 @@ function toObject(value) {
516
516
  }
517
517
 
518
518
  // src/mistral-error.ts
519
+ import { RequestAbortedError } from "@mistralai/mistralai/models/errors/httpclienterrors";
519
520
  import { MistralError } from "@mistralai/mistralai/models/errors";
520
- import { ProviderError } from "@core-ai/core-ai";
521
+ import { AbortedError, ProviderError } from "@core-ai/core-ai";
521
522
  function wrapMistralError(error) {
523
+ if (error instanceof RequestAbortedError || error instanceof Error && error.name === "AbortError") {
524
+ return new AbortedError(error, "mistral");
525
+ }
522
526
  if (error instanceof MistralError) {
523
527
  return new ProviderError(
524
528
  error.message,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-ai/mistral",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Mistral provider package for @core-ai/core-ai",
5
5
  "license": "MIT",
6
6
  "author": "Omnifact (https://omnifact.ai)",
@@ -41,7 +41,7 @@
41
41
  "test:watch": "vitest"
42
42
  },
43
43
  "dependencies": {
44
- "@core-ai/core-ai": "^0.7.1",
44
+ "@core-ai/core-ai": "^0.8.0",
45
45
  "@mistralai/mistralai": "^1.14.0"
46
46
  },
47
47
  "peerDependencies": {