@jambonz/llm 0.5.4 → 0.5.6
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/index.cjs +99 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -1
- package/dist/test-kit/index.cjs +96 -0
- package/dist/test-kit/index.cjs.map +1 -1
- package/dist/test-kit/index.js +96 -0
- package/dist/test-kit/index.js.map +1 -1
- package/package.json +1 -1
package/dist/test-kit/index.cjs
CHANGED
|
@@ -976,6 +976,101 @@ var zaiFactory = {
|
|
|
976
976
|
manifest: zaiManifest,
|
|
977
977
|
create: () => new ZaiAdapter()
|
|
978
978
|
};
|
|
979
|
+
var xaiManifest = {
|
|
980
|
+
vendor: "xai",
|
|
981
|
+
displayName: "xAI (Grok)",
|
|
982
|
+
authKinds: [
|
|
983
|
+
{
|
|
984
|
+
kind: "apiKey",
|
|
985
|
+
displayName: "API Key",
|
|
986
|
+
fields: [
|
|
987
|
+
{
|
|
988
|
+
name: "apiKey",
|
|
989
|
+
label: "API Key",
|
|
990
|
+
type: "password",
|
|
991
|
+
required: true,
|
|
992
|
+
help: "Get an API key from https://console.x.ai/team/default/api-keys"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
name: "baseURL",
|
|
996
|
+
label: "Base URL",
|
|
997
|
+
type: "url",
|
|
998
|
+
required: false,
|
|
999
|
+
default: "https://api.x.ai/v1",
|
|
1000
|
+
help: "Override for proxy endpoints. Defaults to xAI production."
|
|
1001
|
+
}
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
],
|
|
1005
|
+
knownModels: [
|
|
1006
|
+
{
|
|
1007
|
+
id: "grok-4.3",
|
|
1008
|
+
displayName: "Grok 4.3",
|
|
1009
|
+
capabilities: {
|
|
1010
|
+
streaming: true,
|
|
1011
|
+
tools: true,
|
|
1012
|
+
vision: true,
|
|
1013
|
+
systemPrompt: true,
|
|
1014
|
+
maxContextTokens: 1e6
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
id: "grok-4.20-0309-reasoning",
|
|
1019
|
+
displayName: "Grok 4.20 (Reasoning)",
|
|
1020
|
+
capabilities: {
|
|
1021
|
+
streaming: true,
|
|
1022
|
+
tools: true,
|
|
1023
|
+
vision: true,
|
|
1024
|
+
systemPrompt: true,
|
|
1025
|
+
maxContextTokens: 1e6
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
id: "grok-4.20-0309-non-reasoning",
|
|
1030
|
+
displayName: "Grok 4.20 (Non-Reasoning)",
|
|
1031
|
+
capabilities: {
|
|
1032
|
+
streaming: true,
|
|
1033
|
+
tools: true,
|
|
1034
|
+
vision: true,
|
|
1035
|
+
systemPrompt: true,
|
|
1036
|
+
maxContextTokens: 1e6
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
id: "grok-4.20-multi-agent-0309",
|
|
1041
|
+
displayName: "Grok 4.20 Multi-Agent",
|
|
1042
|
+
capabilities: {
|
|
1043
|
+
streaming: true,
|
|
1044
|
+
tools: true,
|
|
1045
|
+
vision: true,
|
|
1046
|
+
systemPrompt: true,
|
|
1047
|
+
maxContextTokens: 1e6
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
],
|
|
1051
|
+
supportsModelListing: true,
|
|
1052
|
+
docsUrl: "https://docs.x.ai/"
|
|
1053
|
+
};
|
|
1054
|
+
var XaiAdapter = class extends OpenAIAdapter {
|
|
1055
|
+
vendor = xaiManifest.vendor;
|
|
1056
|
+
init(auth, client) {
|
|
1057
|
+
super.init(
|
|
1058
|
+
{
|
|
1059
|
+
...auth,
|
|
1060
|
+
baseURL: auth.baseURL ?? "https://api.x.ai/v1"
|
|
1061
|
+
},
|
|
1062
|
+
client
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
1065
|
+
knownModels() {
|
|
1066
|
+
return xaiManifest.knownModels;
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1069
|
+
var xaiFactory = {
|
|
1070
|
+
vendor: xaiManifest.vendor,
|
|
1071
|
+
manifest: xaiManifest,
|
|
1072
|
+
create: () => new XaiAdapter()
|
|
1073
|
+
};
|
|
979
1074
|
|
|
980
1075
|
// src/adapters/anthropic/adapter.ts
|
|
981
1076
|
var import_sdk = __toESM(require("@anthropic-ai/sdk"), 1);
|
|
@@ -3151,6 +3246,7 @@ registerAdapter(deepseekFactory);
|
|
|
3151
3246
|
registerAdapter(basetenFactory);
|
|
3152
3247
|
registerAdapter(moonshotFactory);
|
|
3153
3248
|
registerAdapter(zaiFactory);
|
|
3249
|
+
registerAdapter(xaiFactory);
|
|
3154
3250
|
registerAdapter(anthropicFactory);
|
|
3155
3251
|
registerAdapter(googleFactory);
|
|
3156
3252
|
registerAdapter(vertexGeminiFactory);
|