@providerprotocol/ai 0.0.27 → 0.0.28

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 (37) hide show
  1. package/dist/anthropic/index.d.ts +1 -1
  2. package/dist/anthropic/index.js +38 -1
  3. package/dist/anthropic/index.js.map +1 -1
  4. package/dist/{chunk-6AZVUI6H.js → chunk-ILR2D5PN.js} +7 -1
  5. package/dist/chunk-ILR2D5PN.js.map +1 -0
  6. package/dist/{chunk-MKDLXV4O.js → chunk-NSE7QN3P.js} +1 -1
  7. package/dist/chunk-NSE7QN3P.js.map +1 -0
  8. package/dist/embedding-DtyOFIsS.d.ts +158 -0
  9. package/dist/google/index.d.ts +1 -1
  10. package/dist/google/index.js +41 -4
  11. package/dist/google/index.js.map +1 -1
  12. package/dist/http/index.d.ts +2 -2
  13. package/dist/index.d.ts +430 -514
  14. package/dist/index.js +627 -3
  15. package/dist/index.js.map +1 -1
  16. package/dist/llm-DgDEy9il.d.ts +3118 -0
  17. package/dist/ollama/index.d.ts +1 -1
  18. package/dist/ollama/index.js +2 -1
  19. package/dist/ollama/index.js.map +1 -1
  20. package/dist/openai/index.d.ts +1 -1
  21. package/dist/openai/index.js +70 -3
  22. package/dist/openai/index.js.map +1 -1
  23. package/dist/openrouter/index.d.ts +20 -2
  24. package/dist/openrouter/index.js +134 -13
  25. package/dist/openrouter/index.js.map +1 -1
  26. package/dist/proxy/index.d.ts +2 -2
  27. package/dist/proxy/index.js +3 -2
  28. package/dist/proxy/index.js.map +1 -1
  29. package/dist/{retry-BhX8mIrL.d.ts → retry-DXLQnTuU.d.ts} +1 -1
  30. package/dist/xai/index.d.ts +1 -1
  31. package/dist/xai/index.js +7 -3
  32. package/dist/xai/index.js.map +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunk-6AZVUI6H.js.map +0 -1
  35. package/dist/chunk-MKDLXV4O.js.map +0 -1
  36. package/dist/embedding-CK5oa38O.d.ts +0 -1235
  37. package/dist/provider-6-mJYOOl.d.ts +0 -1474
package/dist/xai/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  isAssistantMessage,
15
15
  isToolResultMessage,
16
16
  isUserMessage
17
- } from "../chunk-6AZVUI6H.js";
17
+ } from "../chunk-ILR2D5PN.js";
18
18
  import {
19
19
  parseSSEStream
20
20
  } from "../chunk-TOJCZMVU.js";
@@ -481,6 +481,7 @@ var XAI_COMPLETIONS_CAPABILITIES = {
481
481
  tools: true,
482
482
  structuredOutput: true,
483
483
  imageInput: true,
484
+ documentInput: false,
484
485
  videoInput: false,
485
486
  audioInput: false
486
487
  };
@@ -1244,6 +1245,7 @@ var XAI_RESPONSES_CAPABILITIES = {
1244
1245
  tools: true,
1245
1246
  structuredOutput: true,
1246
1247
  imageInput: true,
1248
+ documentInput: false,
1247
1249
  videoInput: false,
1248
1250
  audioInput: false
1249
1251
  };
@@ -1301,9 +1303,10 @@ function createResponsesLLMHandler() {
1301
1303
  "llm"
1302
1304
  );
1303
1305
  const data = await parseJsonResponse(response, "xai", "llm");
1304
- if (data.status === "failed" && data.error) {
1306
+ if (data.status === "failed") {
1307
+ const message = data.error?.message ?? "Provider returned a failed response.";
1305
1308
  throw new UPPError(
1306
- data.error.message,
1309
+ message,
1307
1310
  ErrorCode.ProviderError,
1308
1311
  "xai",
1309
1312
  ModalityType.LLM
@@ -1813,6 +1816,7 @@ var XAI_MESSAGES_CAPABILITIES = {
1813
1816
  tools: true,
1814
1817
  structuredOutput: true,
1815
1818
  imageInput: true,
1819
+ documentInput: false,
1816
1820
  videoInput: false,
1817
1821
  audioInput: false
1818
1822
  };