open-agents-ai 0.104.2 → 0.104.3
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.js +18 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38872,6 +38872,24 @@ async function handleEndpoint(arg, ctx, local = false) {
|
|
|
38872
38872
|
|
|
38873
38873
|
`);
|
|
38874
38874
|
}
|
|
38875
|
+
if (ctx.setContextWindowSize) {
|
|
38876
|
+
const activeModel = ctx.config.model;
|
|
38877
|
+
const modelEntry = findModel(newModels, activeModel);
|
|
38878
|
+
if (modelEntry?.contextLength) {
|
|
38879
|
+
ctx.setContextWindowSize(modelEntry.contextLength);
|
|
38880
|
+
} else {
|
|
38881
|
+
const ctxSize = await queryContextSize(normalizedUrl, activeModel, apiKey);
|
|
38882
|
+
if (ctxSize) {
|
|
38883
|
+
ctx.setContextWindowSize(ctxSize);
|
|
38884
|
+
} else {
|
|
38885
|
+
ctx.setContextWindowSize(0);
|
|
38886
|
+
}
|
|
38887
|
+
}
|
|
38888
|
+
}
|
|
38889
|
+
if (ctx.setCapabilities) {
|
|
38890
|
+
const caps = await queryModelCapabilities(normalizedUrl, ctx.config.model);
|
|
38891
|
+
ctx.setCapabilities(caps);
|
|
38892
|
+
}
|
|
38875
38893
|
}
|
|
38876
38894
|
} catch {
|
|
38877
38895
|
renderWarning(`Could not verify model availability on ${provider.label}. If inference fails, use /model to switch.`);
|
package/package.json
CHANGED