@aibranch/llm-meta-widget 0.15.0 → 0.15.1
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/README.md
CHANGED
|
@@ -4270,8 +4270,10 @@ function boot(cfg) {
|
|
|
4270
4270
|
if (flat.length > 1) modelPicker.style.display = "";
|
|
4271
4271
|
}));
|
|
4272
4272
|
} else if (ENABLE_MODEL_PICKER && modelPicker) {
|
|
4273
|
-
tasks.push(fetch(LLM_BASE + "/api/llms", { headers: { "Accept": "application/json" } }).then(function(r) {
|
|
4274
|
-
|
|
4273
|
+
tasks.push(fetch(LLM_BASE + "/api/llms", { headers: { "Accept": "application/json" }, cache: "no-store" }).then(function(r) {
|
|
4274
|
+
if (r.ok) return r.json();
|
|
4275
|
+
console.warn("[llm-meta-widget] /api/llms answered " + r.status + "; the model context window is unknown, so reference data is budgeted at the floor and oversized tool results are not trimmed");
|
|
4276
|
+
return { llms: [] };
|
|
4275
4277
|
}).then(function(payload) {
|
|
4276
4278
|
llmsPayload = payload;
|
|
4277
4279
|
modelWindow = modelWindowFrom(payload, MODEL);
|
|
@@ -4304,8 +4306,10 @@ function boot(cfg) {
|
|
|
4304
4306
|
}));
|
|
4305
4307
|
}
|
|
4306
4308
|
if (ENABLE_TOOL_PICKER && toolsListEl) {
|
|
4307
|
-
tasks.push(fetch(TOOL_HUB_BASE + "/api/mcp_servers", { headers: { "Accept": "application/json" } }).then(function(r) {
|
|
4308
|
-
|
|
4309
|
+
tasks.push(fetch(TOOL_HUB_BASE + "/api/mcp_servers", { headers: { "Accept": "application/json" }, cache: "no-store" }).then(function(r) {
|
|
4310
|
+
if (r.ok) return r.json();
|
|
4311
|
+
console.warn("[llm-meta-widget] /api/mcp_servers answered " + r.status + "; hub-registered tools will be listed as unavailable");
|
|
4312
|
+
return { mcp_servers: [] };
|
|
4309
4313
|
}).then(function(payload) {
|
|
4310
4314
|
hubMcpServers = (payload.mcp_servers || []).filter(function(s) {
|
|
4311
4315
|
return anyAllowedByAllowlist(s.name, HUB_TOOLS_ALLOWLIST);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aibranch/llm-meta-widget",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"//version": "Must stay in step with lib/llm_meta_widget/version.rb. Two independently versioned copies of the same client is the drift docs/custom-element-distribution.md warns about: bump both, release both.",
|
|
5
5
|
"description": "Embeddable browser chat widget: a custom element that discovers tools at page, origin and hub scope and dispatches each tool call to the right one. Two lines of HTML on any host, Rails or not.",
|
|
6
6
|
"keywords": [
|