open-agents-ai 0.184.55 → 0.184.56
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 +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62122,10 +62122,18 @@ function resolveModelEndpoint(modelId) {
|
|
|
62122
62122
|
const exact = modelRouteMap.get(modelId);
|
|
62123
62123
|
if (exact)
|
|
62124
62124
|
return exact;
|
|
62125
|
-
for (const [
|
|
62125
|
+
for (const [, route] of modelRouteMap) {
|
|
62126
62126
|
if (route.originalId === modelId)
|
|
62127
62127
|
return route;
|
|
62128
62128
|
}
|
|
62129
|
+
const slashIdx = modelId.indexOf("/");
|
|
62130
|
+
if (slashIdx > 0) {
|
|
62131
|
+
const prefix = modelId.slice(0, slashIdx);
|
|
62132
|
+
const rest = modelId.slice(slashIdx + 1);
|
|
62133
|
+
const ep = endpointRegistry.find((e) => e.label === prefix);
|
|
62134
|
+
if (ep)
|
|
62135
|
+
return { endpoint: ep, originalId: rest };
|
|
62136
|
+
}
|
|
62129
62137
|
if (endpointRegistry.length > 0) {
|
|
62130
62138
|
return { endpoint: endpointRegistry[0], originalId: modelId };
|
|
62131
62139
|
}
|
package/package.json
CHANGED