@jambonz/llm 0.6.14 → 0.6.16
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 +288 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +288 -0
- package/dist/index.js.map +1 -1
- package/dist/test-kit/index.cjs +279 -0
- package/dist/test-kit/index.cjs.map +1 -1
- package/dist/test-kit/index.js +279 -0
- package/dist/test-kit/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -54,6 +54,7 @@ declare function normalizeAuth(vendor: string, raw: RawCredential): AuthSpec;
|
|
|
54
54
|
* - Vendor with a single `authKind`: that kind is returned unconditionally.
|
|
55
55
|
* - Bedrock: `access_key_id` + `secret_access_key` → `bedrockIam`; else `bedrockApiKey`.
|
|
56
56
|
* - Google: `service_key` present → `googleServiceAccount`; `api_key` present → `googleApiKey`.
|
|
57
|
+
* - google_s2s: `service_key` present → `vertexServiceAccount`; `api_key` present → `googleApiKey`.
|
|
57
58
|
*
|
|
58
59
|
* Throws if the vendor is unknown or if no declared authKind matches the blob.
|
|
59
60
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ declare function normalizeAuth(vendor: string, raw: RawCredential): AuthSpec;
|
|
|
54
54
|
* - Vendor with a single `authKind`: that kind is returned unconditionally.
|
|
55
55
|
* - Bedrock: `access_key_id` + `secret_access_key` → `bedrockIam`; else `bedrockApiKey`.
|
|
56
56
|
* - Google: `service_key` present → `googleServiceAccount`; `api_key` present → `googleApiKey`.
|
|
57
|
+
* - google_s2s: `service_key` present → `vertexServiceAccount`; `api_key` present → `googleApiKey`.
|
|
57
58
|
*
|
|
58
59
|
* Throws if the vendor is unknown or if no declared authKind matches the blob.
|
|
59
60
|
*/
|
package/dist/index.js
CHANGED
|
@@ -4084,6 +4084,277 @@ var elevenlabsS2sManifest = {
|
|
|
4084
4084
|
category: "s2s"
|
|
4085
4085
|
};
|
|
4086
4086
|
|
|
4087
|
+
// src/vendors/google-s2s.ts
|
|
4088
|
+
var googleS2sManifest = {
|
|
4089
|
+
vendor: "google_s2s",
|
|
4090
|
+
displayName: "Google Gemini Live",
|
|
4091
|
+
authKinds: [
|
|
4092
|
+
{
|
|
4093
|
+
kind: "googleApiKey",
|
|
4094
|
+
displayName: "API Key (Gemini Developer API)",
|
|
4095
|
+
fields: [
|
|
4096
|
+
{
|
|
4097
|
+
name: "apiKey",
|
|
4098
|
+
label: "API Key",
|
|
4099
|
+
type: "password",
|
|
4100
|
+
required: true,
|
|
4101
|
+
help: "A Gemini API key from https://aistudio.google.com/apikey"
|
|
4102
|
+
}
|
|
4103
|
+
]
|
|
4104
|
+
},
|
|
4105
|
+
{
|
|
4106
|
+
kind: "vertexServiceAccount",
|
|
4107
|
+
displayName: "Service Account JSON (Vertex AI)",
|
|
4108
|
+
fields: [
|
|
4109
|
+
{
|
|
4110
|
+
name: "credentials",
|
|
4111
|
+
label: "Service Account Key (JSON)",
|
|
4112
|
+
type: "json-file",
|
|
4113
|
+
required: true,
|
|
4114
|
+
help: "The key of a service account with the Vertex AI User role in the project."
|
|
4115
|
+
},
|
|
4116
|
+
{
|
|
4117
|
+
name: "projectId",
|
|
4118
|
+
label: "Project ID",
|
|
4119
|
+
type: "text",
|
|
4120
|
+
required: false,
|
|
4121
|
+
help: "The Google Cloud project to run in. Empty: the service account's own project."
|
|
4122
|
+
},
|
|
4123
|
+
{
|
|
4124
|
+
name: "location",
|
|
4125
|
+
label: "Region",
|
|
4126
|
+
type: "text",
|
|
4127
|
+
required: true,
|
|
4128
|
+
default: "us-central1",
|
|
4129
|
+
help: "A Vertex AI region that serves the Gemini Live API, e.g. us-central1."
|
|
4130
|
+
}
|
|
4131
|
+
]
|
|
4132
|
+
}
|
|
4133
|
+
],
|
|
4134
|
+
knownModels: [],
|
|
4135
|
+
supportsModelListing: false,
|
|
4136
|
+
docsUrl: "https://ai.google.dev/gemini-api/docs/live",
|
|
4137
|
+
credentialOnly: true,
|
|
4138
|
+
category: "s2s"
|
|
4139
|
+
};
|
|
4140
|
+
|
|
4141
|
+
// src/vendors/xai-s2s.ts
|
|
4142
|
+
var xaiS2sManifest = {
|
|
4143
|
+
vendor: "xai_s2s",
|
|
4144
|
+
displayName: "xAI Grok Voice",
|
|
4145
|
+
authKinds: [
|
|
4146
|
+
{
|
|
4147
|
+
kind: "apiKey",
|
|
4148
|
+
displayName: "API Key",
|
|
4149
|
+
fields: [
|
|
4150
|
+
{
|
|
4151
|
+
name: "apiKey",
|
|
4152
|
+
label: "API Key",
|
|
4153
|
+
type: "password",
|
|
4154
|
+
required: true,
|
|
4155
|
+
help: "An xAI API key (console.x.ai: API Keys)."
|
|
4156
|
+
}
|
|
4157
|
+
]
|
|
4158
|
+
}
|
|
4159
|
+
],
|
|
4160
|
+
knownModels: [],
|
|
4161
|
+
supportsModelListing: false,
|
|
4162
|
+
docsUrl: "https://docs.x.ai/docs/guides/voice/agent",
|
|
4163
|
+
credentialOnly: true,
|
|
4164
|
+
category: "s2s"
|
|
4165
|
+
};
|
|
4166
|
+
|
|
4167
|
+
// src/vendors/qwen-s2s.ts
|
|
4168
|
+
var qwenS2sManifest = {
|
|
4169
|
+
vendor: "qwen_s2s",
|
|
4170
|
+
displayName: "Qwen Omni Realtime",
|
|
4171
|
+
authKinds: [
|
|
4172
|
+
{
|
|
4173
|
+
kind: "apiKey",
|
|
4174
|
+
displayName: "API Key",
|
|
4175
|
+
fields: [
|
|
4176
|
+
{
|
|
4177
|
+
name: "apiKey",
|
|
4178
|
+
label: "API Key",
|
|
4179
|
+
type: "password",
|
|
4180
|
+
required: true,
|
|
4181
|
+
help: "A Model Studio (DashScope) API key."
|
|
4182
|
+
},
|
|
4183
|
+
{
|
|
4184
|
+
name: "host",
|
|
4185
|
+
label: "Workspace host",
|
|
4186
|
+
type: "text",
|
|
4187
|
+
required: true,
|
|
4188
|
+
help: "The realtime host of the workspace the key belongs to, e.g. ws-xxxx.ap-southeast-1.maas.aliyuncs.com, or dashscope-intl.aliyuncs.com for the international default. A full URL is accepted; only the host is used."
|
|
4189
|
+
}
|
|
4190
|
+
]
|
|
4191
|
+
}
|
|
4192
|
+
],
|
|
4193
|
+
knownModels: [],
|
|
4194
|
+
supportsModelListing: false,
|
|
4195
|
+
docsUrl: "https://www.alibabacloud.com/help/en/model-studio/realtime",
|
|
4196
|
+
credentialOnly: true,
|
|
4197
|
+
category: "s2s"
|
|
4198
|
+
};
|
|
4199
|
+
|
|
4200
|
+
// src/vendors/assemblyai-s2s.ts
|
|
4201
|
+
var assemblyaiS2sManifest = {
|
|
4202
|
+
vendor: "assemblyai_s2s",
|
|
4203
|
+
displayName: "AssemblyAI Voice Agent",
|
|
4204
|
+
authKinds: [
|
|
4205
|
+
{
|
|
4206
|
+
kind: "apiKey",
|
|
4207
|
+
displayName: "API Key",
|
|
4208
|
+
fields: [
|
|
4209
|
+
{
|
|
4210
|
+
name: "apiKey",
|
|
4211
|
+
label: "API Key",
|
|
4212
|
+
type: "password",
|
|
4213
|
+
required: true,
|
|
4214
|
+
help: "An AssemblyAI API key (assemblyai.com dashboard: API Keys)."
|
|
4215
|
+
}
|
|
4216
|
+
]
|
|
4217
|
+
}
|
|
4218
|
+
],
|
|
4219
|
+
knownModels: [],
|
|
4220
|
+
supportsModelListing: false,
|
|
4221
|
+
docsUrl: "https://www.assemblyai.com/docs",
|
|
4222
|
+
credentialOnly: true,
|
|
4223
|
+
category: "s2s"
|
|
4224
|
+
};
|
|
4225
|
+
|
|
4226
|
+
// src/vendors/voicelive-s2s.ts
|
|
4227
|
+
var voiceliveS2sManifest = {
|
|
4228
|
+
vendor: "voicelive_s2s",
|
|
4229
|
+
displayName: "Azure Voice Live",
|
|
4230
|
+
authKinds: [
|
|
4231
|
+
{
|
|
4232
|
+
kind: "apiKey",
|
|
4233
|
+
displayName: "API Key",
|
|
4234
|
+
fields: [
|
|
4235
|
+
{
|
|
4236
|
+
name: "apiKey",
|
|
4237
|
+
label: "API Key",
|
|
4238
|
+
type: "password",
|
|
4239
|
+
required: true,
|
|
4240
|
+
help: "A key of the Azure AI Foundry (AI Services) resource: Keys and Endpoint."
|
|
4241
|
+
},
|
|
4242
|
+
{
|
|
4243
|
+
name: "host",
|
|
4244
|
+
label: "Resource host",
|
|
4245
|
+
type: "text",
|
|
4246
|
+
required: true,
|
|
4247
|
+
help: "The resource host, e.g. my-resource.services.ai.azure.com. A full endpoint URL is accepted; only the host is used."
|
|
4248
|
+
}
|
|
4249
|
+
]
|
|
4250
|
+
}
|
|
4251
|
+
],
|
|
4252
|
+
knownModels: [],
|
|
4253
|
+
supportsModelListing: false,
|
|
4254
|
+
docsUrl: "https://learn.microsoft.com/azure/ai-services/speech-service/voice-live",
|
|
4255
|
+
credentialOnly: true,
|
|
4256
|
+
category: "s2s"
|
|
4257
|
+
};
|
|
4258
|
+
|
|
4259
|
+
// src/vendors/azure-openai-s2s.ts
|
|
4260
|
+
var azureOpenaiS2sManifest = {
|
|
4261
|
+
vendor: "azure_openai_s2s",
|
|
4262
|
+
displayName: "Azure OpenAI Realtime",
|
|
4263
|
+
authKinds: [
|
|
4264
|
+
{
|
|
4265
|
+
kind: "apiKey",
|
|
4266
|
+
displayName: "API Key",
|
|
4267
|
+
fields: [
|
|
4268
|
+
{
|
|
4269
|
+
name: "apiKey",
|
|
4270
|
+
label: "API Key",
|
|
4271
|
+
type: "password",
|
|
4272
|
+
required: true,
|
|
4273
|
+
help: "A key of the Azure OpenAI resource: Keys and Endpoint."
|
|
4274
|
+
},
|
|
4275
|
+
{
|
|
4276
|
+
name: "host",
|
|
4277
|
+
label: "Resource host",
|
|
4278
|
+
type: "text",
|
|
4279
|
+
required: true,
|
|
4280
|
+
help: "The resource host, e.g. my-resource.openai.azure.com. A full endpoint URL is accepted; only the host is used."
|
|
4281
|
+
}
|
|
4282
|
+
]
|
|
4283
|
+
}
|
|
4284
|
+
],
|
|
4285
|
+
knownModels: [],
|
|
4286
|
+
supportsModelListing: false,
|
|
4287
|
+
docsUrl: "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/realtime-audio-websockets",
|
|
4288
|
+
credentialOnly: true,
|
|
4289
|
+
category: "s2s"
|
|
4290
|
+
};
|
|
4291
|
+
|
|
4292
|
+
// src/vendors/nova-s2s.ts
|
|
4293
|
+
var novaS2sManifest = {
|
|
4294
|
+
vendor: "nova_s2s",
|
|
4295
|
+
displayName: "Amazon Nova Sonic",
|
|
4296
|
+
authKinds: [
|
|
4297
|
+
{
|
|
4298
|
+
kind: "bedrockIam",
|
|
4299
|
+
displayName: "IAM Credentials",
|
|
4300
|
+
fields: [
|
|
4301
|
+
{
|
|
4302
|
+
name: "accessKeyId",
|
|
4303
|
+
label: "Access Key ID",
|
|
4304
|
+
type: "text",
|
|
4305
|
+
required: true,
|
|
4306
|
+
help: "An IAM user access key allowed bedrock:InvokeModelWithBidirectionalStream on the Nova Sonic model."
|
|
4307
|
+
},
|
|
4308
|
+
{
|
|
4309
|
+
name: "secretAccessKey",
|
|
4310
|
+
label: "Secret Access Key",
|
|
4311
|
+
type: "password",
|
|
4312
|
+
required: true
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
name: "region",
|
|
4316
|
+
label: "Region",
|
|
4317
|
+
type: "text",
|
|
4318
|
+
required: true,
|
|
4319
|
+
default: "us-east-1",
|
|
4320
|
+
help: "A Bedrock region where Nova Sonic is enabled for the account, e.g. us-east-1."
|
|
4321
|
+
}
|
|
4322
|
+
]
|
|
4323
|
+
}
|
|
4324
|
+
],
|
|
4325
|
+
knownModels: [],
|
|
4326
|
+
supportsModelListing: false,
|
|
4327
|
+
docsUrl: "https://docs.aws.amazon.com/nova/latest/userguide/speech.html",
|
|
4328
|
+
credentialOnly: true,
|
|
4329
|
+
category: "s2s"
|
|
4330
|
+
};
|
|
4331
|
+
|
|
4332
|
+
// src/vendors/phonic-s2s.ts
|
|
4333
|
+
var phonicS2sManifest = {
|
|
4334
|
+
vendor: "phonic_s2s",
|
|
4335
|
+
displayName: "Phonic",
|
|
4336
|
+
authKinds: [
|
|
4337
|
+
{
|
|
4338
|
+
kind: "apiKey",
|
|
4339
|
+
displayName: "API Key",
|
|
4340
|
+
fields: [
|
|
4341
|
+
{
|
|
4342
|
+
name: "apiKey",
|
|
4343
|
+
label: "API Key",
|
|
4344
|
+
type: "password",
|
|
4345
|
+
required: true,
|
|
4346
|
+
help: "A Phonic API key (starts with ph_). Phonic uses the same keys for text-to-speech."
|
|
4347
|
+
}
|
|
4348
|
+
]
|
|
4349
|
+
}
|
|
4350
|
+
],
|
|
4351
|
+
knownModels: [],
|
|
4352
|
+
supportsModelListing: false,
|
|
4353
|
+
docsUrl: "https://docs.phonic.ai/docs/get-started/overview",
|
|
4354
|
+
credentialOnly: true,
|
|
4355
|
+
category: "s2s"
|
|
4356
|
+
};
|
|
4357
|
+
|
|
4087
4358
|
// src/adapters/index.ts
|
|
4088
4359
|
registerAdapter(openAIFactory);
|
|
4089
4360
|
registerAdapter(deepseekFactory);
|
|
@@ -4108,6 +4379,14 @@ registerCredentialVendor(gptliveS2sManifest);
|
|
|
4108
4379
|
registerCredentialVendor(ultravoxS2sManifest);
|
|
4109
4380
|
registerCredentialVendor(deepgramS2sManifest);
|
|
4110
4381
|
registerCredentialVendor(elevenlabsS2sManifest);
|
|
4382
|
+
registerCredentialVendor(googleS2sManifest);
|
|
4383
|
+
registerCredentialVendor(xaiS2sManifest);
|
|
4384
|
+
registerCredentialVendor(qwenS2sManifest);
|
|
4385
|
+
registerCredentialVendor(assemblyaiS2sManifest);
|
|
4386
|
+
registerCredentialVendor(voiceliveS2sManifest);
|
|
4387
|
+
registerCredentialVendor(azureOpenaiS2sManifest);
|
|
4388
|
+
registerCredentialVendor(novaS2sManifest);
|
|
4389
|
+
registerCredentialVendor(phonicS2sManifest);
|
|
4111
4390
|
registerCredentialVendor(dialogflowCesManifest);
|
|
4112
4391
|
|
|
4113
4392
|
// src/normalize-auth.ts
|
|
@@ -4291,6 +4570,15 @@ function pickAuthKind(vendor, raw) {
|
|
|
4291
4570
|
`pickAuthKind: google credential missing both 'api_key' and 'service_key'`
|
|
4292
4571
|
);
|
|
4293
4572
|
}
|
|
4573
|
+
case "google_s2s": {
|
|
4574
|
+
const svc = authKinds.find((k) => k.kind === "vertexServiceAccount");
|
|
4575
|
+
const apiKey = authKinds.find((k) => k.kind === "googleApiKey");
|
|
4576
|
+
if (raw.service_key && svc) return svc;
|
|
4577
|
+
if (raw.api_key && apiKey) return apiKey;
|
|
4578
|
+
throw new Error(
|
|
4579
|
+
`pickAuthKind: google_s2s credential missing both 'api_key' and 'service_key'`
|
|
4580
|
+
);
|
|
4581
|
+
}
|
|
4294
4582
|
default:
|
|
4295
4583
|
throw new Error(
|
|
4296
4584
|
`pickAuthKind: vendor '${vendor}' declares ${authKinds.length} authKinds but has no discriminator rule. Add one in src/pick-auth-kind.ts.`
|