@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.
@@ -1082,6 +1082,116 @@ var xaiFactory = {
1082
1082
  manifest: xaiManifest,
1083
1083
  create: () => new XaiAdapter()
1084
1084
  };
1085
+ var BEDROCK_MANTLE_DEFAULT_BASE_URL = "https://bedrock-mantle.us-east-1.api.aws/v1";
1086
+ var bedrockMantleManifest = {
1087
+ vendor: "bedrock-mantle",
1088
+ displayName: "AWS Bedrock (OpenAI-compatible)",
1089
+ authKinds: [
1090
+ {
1091
+ kind: "apiKey",
1092
+ displayName: "API Key",
1093
+ fields: [
1094
+ {
1095
+ name: "apiKey",
1096
+ label: "Bedrock API Key",
1097
+ type: "password",
1098
+ required: true,
1099
+ help: "Generate a long-term Bedrock API key in the AWS console (Amazon Bedrock \u2192 API keys)."
1100
+ },
1101
+ {
1102
+ name: "baseURL",
1103
+ label: "Base URL",
1104
+ type: "url",
1105
+ required: false,
1106
+ default: BEDROCK_MANTLE_DEFAULT_BASE_URL,
1107
+ help: "Change the region to match your key. xAI models are served only on the /openai/v1 path."
1108
+ }
1109
+ ]
1110
+ }
1111
+ ],
1112
+ /* A convenience seed, NOT the source of truth: the live `/v1/models`
1113
+ * endpoint is authoritative and grows continuously, which is why
1114
+ * `supportsModelListing` is true. Any model the endpoint lists can be used
1115
+ * by id without appearing here.
1116
+ *
1117
+ * AWS publishes no context-window metadata (neither `/v1/models` nor
1118
+ * `GetFoundationModel` returns it), so these limits are carried over from
1119
+ * the native-vendor manifests above for the same underlying models. Vision
1120
+ * follows Bedrock's `inputModalities`. */
1121
+ knownModels: [
1122
+ {
1123
+ id: "zai.glm-5",
1124
+ displayName: "GLM 5",
1125
+ capabilities: {
1126
+ streaming: true,
1127
+ tools: true,
1128
+ vision: false,
1129
+ systemPrompt: true,
1130
+ maxContextTokens: 202800
1131
+ }
1132
+ },
1133
+ {
1134
+ id: "zai.glm-4.7",
1135
+ displayName: "GLM 4.7",
1136
+ capabilities: {
1137
+ streaming: true,
1138
+ tools: true,
1139
+ vision: false,
1140
+ systemPrompt: true,
1141
+ maxContextTokens: 2e5
1142
+ }
1143
+ },
1144
+ {
1145
+ id: "moonshotai.kimi-k2.5",
1146
+ displayName: "Kimi K2.5",
1147
+ capabilities: {
1148
+ streaming: true,
1149
+ tools: true,
1150
+ vision: true,
1151
+ systemPrompt: true,
1152
+ maxContextTokens: 262144
1153
+ }
1154
+ },
1155
+ {
1156
+ id: "xai.grok-4.3",
1157
+ displayName: "Grok 4.3",
1158
+ capabilities: {
1159
+ streaming: true,
1160
+ tools: true,
1161
+ vision: true,
1162
+ systemPrompt: true,
1163
+ maxContextTokens: 1e6
1164
+ }
1165
+ }
1166
+ ],
1167
+ supportsModelListing: true,
1168
+ docsUrl: "https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions.html"
1169
+ };
1170
+ var BedrockMantleAdapter = class extends OpenAIAdapter {
1171
+ vendor = bedrockMantleManifest.vendor;
1172
+ init(auth, client) {
1173
+ super.init(
1174
+ {
1175
+ ...auth,
1176
+ baseURL: auth.baseURL ?? BEDROCK_MANTLE_DEFAULT_BASE_URL
1177
+ },
1178
+ client
1179
+ );
1180
+ }
1181
+ knownModels() {
1182
+ return bedrockMantleManifest.knownModels;
1183
+ }
1184
+ // Mantle fronts many third-party runtimes with differing param strictness,
1185
+ // and prompt_cache_key is unverified against all of them — do not forward.
1186
+ forwardCacheKey() {
1187
+ return false;
1188
+ }
1189
+ };
1190
+ var bedrockMantleFactory = {
1191
+ vendor: bedrockMantleManifest.vendor,
1192
+ manifest: bedrockMantleManifest,
1193
+ create: () => new BedrockMantleAdapter()
1194
+ };
1085
1195
 
1086
1196
  // src/adapters/anthropic/adapter.ts
1087
1197
  import Anthropic from "@anthropic-ai/sdk";
@@ -3408,6 +3518,7 @@ registerAdapter(basetenFactory);
3408
3518
  registerAdapter(moonshotFactory);
3409
3519
  registerAdapter(zaiFactory);
3410
3520
  registerAdapter(xaiFactory);
3521
+ registerAdapter(bedrockMantleFactory);
3411
3522
  registerAdapter(anthropicFactory);
3412
3523
  registerAdapter(googleFactory);
3413
3524
  registerAdapter(vertexGeminiFactory);