@wrongstack/webui 0.250.0 → 0.255.0
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/assets/index-DcnrP-gv.js +163 -0
- package/dist/assets/index-u41ruU9Z.css +2 -0
- package/dist/assets/{vendor-BtOIO1oa.js → vendor-DEuauVA6.js} +229 -229
- package/dist/index.html +3 -3
- package/dist/index.js +2601 -819
- package/dist/index.js.map +1 -1
- package/dist/server/entry.js +8 -0
- package/dist/server/entry.js.map +1 -1
- package/dist/server/index.js +8 -0
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/assets/index-Cm_R0cfw.css +0 -2
- package/dist/assets/index-DIwGHhP2.js +0 -163
package/dist/server/entry.js
CHANGED
|
@@ -3296,6 +3296,14 @@ async function startWebUI(opts = {}) {
|
|
|
3296
3296
|
try {
|
|
3297
3297
|
const m = await modelsRegistry.getModel(config.provider, config.model);
|
|
3298
3298
|
maxContext = m?.capabilities?.maxContext ?? 0;
|
|
3299
|
+
if (!maxContext) {
|
|
3300
|
+
try {
|
|
3301
|
+
const provider2 = await modelsRegistry.getProvider(config.provider);
|
|
3302
|
+
const rawModel = provider2?.models.find((mod) => mod.id === config.model);
|
|
3303
|
+
maxContext = rawModel?.limit?.context ?? 0;
|
|
3304
|
+
} catch {
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3299
3307
|
const rates = getCostRates(m);
|
|
3300
3308
|
inputCost = rates.input;
|
|
3301
3309
|
outputCost = rates.output;
|