@neta-art/cohub-cli 3.3.1 → 3.4.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/commands/models.js +7 -3
- package/package.json +3 -3
package/dist/commands/models.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { filterGenerationDeclarationsByPolicy, parseGenerationPolicyFromEnv, } from "@neta-art/cohub";
|
|
1
|
+
import { filterDiscoverableGenerationModels, filterGenerationDeclarationsByPolicy, getAllowedGenerationModelIds, parseGenerationPolicyFromEnv, } from "@neta-art/cohub";
|
|
2
2
|
import { createClient } from "../client.js";
|
|
3
3
|
import { table, json as outJson, jsonRequested, error, handleHttp } from "../output.js";
|
|
4
4
|
function toMultimodalModelSummary(model) {
|
|
@@ -92,8 +92,12 @@ Examples:
|
|
|
92
92
|
try {
|
|
93
93
|
if (opts.modelType === "multimodal") {
|
|
94
94
|
const response = await client.models.listMultimodal();
|
|
95
|
-
const
|
|
96
|
-
const
|
|
95
|
+
const policy = parseGenerationPolicyFromEnv(process.env);
|
|
96
|
+
const allowedModelIds = getAllowedGenerationModelIds(policy);
|
|
97
|
+
const filtered = filterGenerationDeclarationsByPolicy(response.models, policy);
|
|
98
|
+
const models = filterDiscoverableGenerationModels(filtered, {
|
|
99
|
+
includeModelIds: allowedModelIds ?? undefined,
|
|
100
|
+
}).map(toMultimodalModelSummary);
|
|
97
101
|
if (jsonRequested(opts))
|
|
98
102
|
return outJson({ models });
|
|
99
103
|
table(models, [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neta-art/cohub-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"NOTICE"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@neta-art/generation": "^0.1.
|
|
18
|
+
"@neta-art/generation": "^0.1.18",
|
|
19
19
|
"commander": "^15.0.0",
|
|
20
20
|
"pixi.js": "^8.19.0",
|
|
21
21
|
"sharp": "^0.35.3",
|
|
22
|
-
"@neta-art/cohub": "4.
|
|
22
|
+
"@neta-art/cohub": "4.7.0"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|