@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.
- package/dist/anthropic/index.d.ts +1 -1
- package/dist/anthropic/index.js +38 -1
- package/dist/anthropic/index.js.map +1 -1
- package/dist/{chunk-6AZVUI6H.js → chunk-ILR2D5PN.js} +7 -1
- package/dist/chunk-ILR2D5PN.js.map +1 -0
- package/dist/{chunk-MKDLXV4O.js → chunk-NSE7QN3P.js} +1 -1
- package/dist/chunk-NSE7QN3P.js.map +1 -0
- package/dist/embedding-DtyOFIsS.d.ts +158 -0
- package/dist/google/index.d.ts +1 -1
- package/dist/google/index.js +41 -4
- package/dist/google/index.js.map +1 -1
- package/dist/http/index.d.ts +2 -2
- package/dist/index.d.ts +430 -514
- package/dist/index.js +627 -3
- package/dist/index.js.map +1 -1
- package/dist/llm-DgDEy9il.d.ts +3118 -0
- package/dist/ollama/index.d.ts +1 -1
- package/dist/ollama/index.js +2 -1
- package/dist/ollama/index.js.map +1 -1
- package/dist/openai/index.d.ts +1 -1
- package/dist/openai/index.js +70 -3
- package/dist/openai/index.js.map +1 -1
- package/dist/openrouter/index.d.ts +20 -2
- package/dist/openrouter/index.js +134 -13
- package/dist/openrouter/index.js.map +1 -1
- package/dist/proxy/index.d.ts +2 -2
- package/dist/proxy/index.js +3 -2
- package/dist/proxy/index.js.map +1 -1
- package/dist/{retry-BhX8mIrL.d.ts → retry-DXLQnTuU.d.ts} +1 -1
- package/dist/xai/index.d.ts +1 -1
- package/dist/xai/index.js +7 -3
- package/dist/xai/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6AZVUI6H.js.map +0 -1
- package/dist/chunk-MKDLXV4O.js.map +0 -1
- package/dist/embedding-CK5oa38O.d.ts +0 -1235
- 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-
|
|
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"
|
|
1306
|
+
if (data.status === "failed") {
|
|
1307
|
+
const message = data.error?.message ?? "Provider returned a failed response.";
|
|
1305
1308
|
throw new UPPError(
|
|
1306
|
-
|
|
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
|
};
|