@jambonz/llm 0.6.1 → 0.6.2

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.
@@ -1121,6 +1121,116 @@ var xaiFactory = {
1121
1121
  manifest: xaiManifest,
1122
1122
  create: () => new XaiAdapter()
1123
1123
  };
1124
+ var BEDROCK_MANTLE_DEFAULT_BASE_URL = "https://bedrock-mantle.us-east-1.api.aws/v1";
1125
+ var bedrockMantleManifest = {
1126
+ vendor: "bedrock-mantle",
1127
+ displayName: "AWS Bedrock (OpenAI-compatible)",
1128
+ authKinds: [
1129
+ {
1130
+ kind: "apiKey",
1131
+ displayName: "API Key",
1132
+ fields: [
1133
+ {
1134
+ name: "apiKey",
1135
+ label: "Bedrock API Key",
1136
+ type: "password",
1137
+ required: true,
1138
+ help: "Generate a long-term Bedrock API key in the AWS console (Amazon Bedrock \u2192 API keys)."
1139
+ },
1140
+ {
1141
+ name: "baseURL",
1142
+ label: "Base URL",
1143
+ type: "url",
1144
+ required: false,
1145
+ default: BEDROCK_MANTLE_DEFAULT_BASE_URL,
1146
+ help: "Change the region to match your key. xAI models are served only on the /openai/v1 path."
1147
+ }
1148
+ ]
1149
+ }
1150
+ ],
1151
+ /* A convenience seed, NOT the source of truth: the live `/v1/models`
1152
+ * endpoint is authoritative and grows continuously, which is why
1153
+ * `supportsModelListing` is true. Any model the endpoint lists can be used
1154
+ * by id without appearing here.
1155
+ *
1156
+ * AWS publishes no context-window metadata (neither `/v1/models` nor
1157
+ * `GetFoundationModel` returns it), so these limits are carried over from
1158
+ * the native-vendor manifests above for the same underlying models. Vision
1159
+ * follows Bedrock's `inputModalities`. */
1160
+ knownModels: [
1161
+ {
1162
+ id: "zai.glm-5",
1163
+ displayName: "GLM 5",
1164
+ capabilities: {
1165
+ streaming: true,
1166
+ tools: true,
1167
+ vision: false,
1168
+ systemPrompt: true,
1169
+ maxContextTokens: 202800
1170
+ }
1171
+ },
1172
+ {
1173
+ id: "zai.glm-4.7",
1174
+ displayName: "GLM 4.7",
1175
+ capabilities: {
1176
+ streaming: true,
1177
+ tools: true,
1178
+ vision: false,
1179
+ systemPrompt: true,
1180
+ maxContextTokens: 2e5
1181
+ }
1182
+ },
1183
+ {
1184
+ id: "moonshotai.kimi-k2.5",
1185
+ displayName: "Kimi K2.5",
1186
+ capabilities: {
1187
+ streaming: true,
1188
+ tools: true,
1189
+ vision: true,
1190
+ systemPrompt: true,
1191
+ maxContextTokens: 262144
1192
+ }
1193
+ },
1194
+ {
1195
+ id: "xai.grok-4.3",
1196
+ displayName: "Grok 4.3",
1197
+ capabilities: {
1198
+ streaming: true,
1199
+ tools: true,
1200
+ vision: true,
1201
+ systemPrompt: true,
1202
+ maxContextTokens: 1e6
1203
+ }
1204
+ }
1205
+ ],
1206
+ supportsModelListing: true,
1207
+ docsUrl: "https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html"
1208
+ };
1209
+ var BedrockMantleAdapter = class extends OpenAIAdapter {
1210
+ vendor = bedrockMantleManifest.vendor;
1211
+ init(auth, client) {
1212
+ super.init(
1213
+ {
1214
+ ...auth,
1215
+ baseURL: auth.baseURL ?? BEDROCK_MANTLE_DEFAULT_BASE_URL
1216
+ },
1217
+ client
1218
+ );
1219
+ }
1220
+ knownModels() {
1221
+ return bedrockMantleManifest.knownModels;
1222
+ }
1223
+ // Mantle fronts many third-party runtimes with differing param strictness,
1224
+ // and prompt_cache_key is unverified against all of them — do not forward.
1225
+ forwardCacheKey() {
1226
+ return false;
1227
+ }
1228
+ };
1229
+ var bedrockMantleFactory = {
1230
+ vendor: bedrockMantleManifest.vendor,
1231
+ manifest: bedrockMantleManifest,
1232
+ create: () => new BedrockMantleAdapter()
1233
+ };
1124
1234
 
1125
1235
  // src/adapters/anthropic/adapter.ts
1126
1236
  var import_sdk = __toESM(require("@anthropic-ai/sdk"), 1);
@@ -3441,6 +3551,7 @@ registerAdapter(basetenFactory);
3441
3551
  registerAdapter(moonshotFactory);
3442
3552
  registerAdapter(zaiFactory);
3443
3553
  registerAdapter(xaiFactory);
3554
+ registerAdapter(bedrockMantleFactory);
3444
3555
  registerAdapter(anthropicFactory);
3445
3556
  registerAdapter(googleFactory);
3446
3557
  registerAdapter(vertexGeminiFactory);