@uipath/model-hub-tool 1.200.0-preview.118

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 ADDED
@@ -0,0 +1,195 @@
1
+ # @uipath/model-hub-tool
2
+
3
+ `uip` plugin providing read and configuration views over **UiPath Model Hub** — the
4
+ LLM Gateway routing layer of the AI Trust Layer. It exposes organization- and
5
+ tenant-scoped model configuration, per-region custom routing rules, routing-rule
6
+ change history, and governance-policy previews.
7
+
8
+ Command prefix: `model-hub`.
9
+
10
+ > **Status: not yet published.** This package is marked `"private": true` and is
11
+ > excluded from npm publishing. It builds and loads in the local CLI, but is not
12
+ > installable from the registry.
13
+
14
+ ## Authentication
15
+
16
+ All commands require an authenticated session:
17
+
18
+ ```bash
19
+ uip login
20
+ ```
21
+
22
+ Your account must have the **OrganizationAdmin** role for the AI Trust Layer.
23
+
24
+ ## Common options
25
+
26
+ Every command accepts:
27
+
28
+ | Option | Description |
29
+ | ---------------------------- | ---------------------------------------------------------------------------- |
30
+ | `--tenant <name>` | Target tenant name (defaults to the authenticated tenant). |
31
+ | `--login-validity <minutes>` | Override the interactive-login token lifetime for this call. |
32
+
33
+ The standard global CLI options (`--output <table\|json\|yaml\|plain>` and
34
+ `--output-filter <jmespath>`) apply as well.
35
+
36
+ **Allowed regions** (for `--*-region` flags): `EU`, `CA`, `US`, `SI`, `JA`, `AU`,
37
+ `IN`, `UK`, `CH`, `UAE`, `SK`, `GLOBAL`.
38
+
39
+ ## Commands
40
+
41
+ ### `model-hub organizations get`
42
+
43
+ Fetch the organization overview for the current organization — per-tenant model
44
+ counts (total / active / custom / deprecating) and blocked-entry totals.
45
+
46
+ ```bash
47
+ uip model-hub organizations get
48
+ ```
49
+
50
+ **Output code:** `ModelHubOrganizationsGet`
51
+
52
+ ---
53
+
54
+ ### `model-hub tenants get`
55
+
56
+ Fetch the tenant overview for the current tenant — the per-product, per-feature
57
+ routing rules including model, managed-by, status, and BYO onboarding state.
58
+
59
+ ```bash
60
+ uip model-hub tenants get
61
+ uip model-hub tenants get --force-refresh # bypass cached policy, re-resolve from source
62
+ ```
63
+
64
+ **Options:**
65
+
66
+ | Option | Description |
67
+ | ----------------- | ------------------------------------------------------------------- |
68
+ | `--force-refresh` | Bypass any cached policy and re-resolve the configuration from source. |
69
+
70
+ **Output code:** `ModelHubTenantsGet`
71
+
72
+ ---
73
+
74
+ ### `model-hub custom-routings get`
75
+
76
+ Look up the per-region model-availability map for a `(product, feature,
77
+ primary-model)` tuple. Use it to pick valid `--current-model` / `--current-region`
78
+ values before running `custom-routings create`.
79
+
80
+ ```bash
81
+ uip model-hub custom-routings get \
82
+ --product agenthub \
83
+ --feature llm-call \
84
+ --primary-model gpt-5-mini-2025-08-07 \
85
+ --current-model gpt-5-mini-2025-08-07
86
+ ```
87
+
88
+ **Options:**
89
+
90
+ | Option | Required | Description |
91
+ | ------------------------------- | :------: | ---------------------------------------------------------------- |
92
+ | `--product <name>` | ✓ | Model Hub product (e.g. `agenthub`, `agents`). |
93
+ | `--feature <name>` | ✓ | Feature within the product (e.g. `llm-call`). |
94
+ | `--primary-model <id>` | ✓ | Base rule's model whose alternatives to enumerate. |
95
+ | `--current-model <id>` | ✓ | Required by server validation; echoed back in the response. |
96
+ | `--primary-model-region <r>` | | Sent for DTO completeness; not used for the lookup. |
97
+ | `--current-region <r>` | | Sent for DTO completeness; not used for the lookup. |
98
+
99
+ **Output code:** `ModelHubCustomRoutingsGet`
100
+
101
+ ---
102
+
103
+ ### `model-hub custom-routings create`
104
+
105
+ Upsert a custom routing rule for a `(product, feature, primary-model)`. If the
106
+ requested target matches the gitops default, the existing custom rule is removed
107
+ instead. Returns the resulting tenant overview.
108
+
109
+ ```bash
110
+ uip model-hub custom-routings create \
111
+ --product agenthub \
112
+ --feature llm-call \
113
+ --primary-model gpt-5-mini-2025-08-07 \
114
+ --primary-model-region US \
115
+ --current-model gpt-5-mini-2025-08-07 \
116
+ --current-region EU
117
+ ```
118
+
119
+ **Options:** (all required)
120
+
121
+ | Option | Description |
122
+ | ---------------------------- | ---------------------------------------------------------------- |
123
+ | `--product <name>` | Model Hub product (e.g. `agenthub`, `agents`). |
124
+ | `--feature <name>` | Feature within the product (e.g. `llm-call`). |
125
+ | `--primary-model <id>` | Base rule's model identifier being overridden. |
126
+ | `--primary-model-region <r>` | The tenant's region (the base rule's region). |
127
+ | `--current-model <id>` | Target model to route to. |
128
+ | `--current-region <r>` | Target region to route to. |
129
+
130
+ **Output code:** `ModelHubCustomRoutingsCreate`
131
+
132
+ ---
133
+
134
+ ### `model-hub routing-history list`
135
+
136
+ List routing-rule change history for a `(product, feature, model)`. Shows old/new
137
+ model + region per change, the actor (`System` or `User`), and the timestamp.
138
+
139
+ ```bash
140
+ uip model-hub routing-history list \
141
+ --product agenthub \
142
+ --feature llm-call \
143
+ --model gpt-5.1-2025-11-13
144
+ ```
145
+
146
+ **Options:**
147
+
148
+ | Option | Required | Description |
149
+ | ------------------- | :------: | ----------------------------------------------------- |
150
+ | `--product <name>` | ✓ | Model Hub product (e.g. `agenthub`). |
151
+ | `--feature <name>` | ✓ | Feature within the product (e.g. `llm-call`). |
152
+ | `--model <id>` | ✓ | Model identifier whose history to retrieve. |
153
+
154
+ > Returns the full change history for the tuple. Server-side pagination
155
+ > (`limit` / `offset`) is not yet available.
156
+
157
+ **Output code:** `ModelHubRoutingHistoryList`
158
+
159
+ ---
160
+
161
+ ### `model-hub policy-previews get`
162
+
163
+ Preview the tenant Model Hub configuration that would result if a given governance
164
+ policy were applied — same shape as `tenants get`, computed against the supplied
165
+ policy instead of the active one.
166
+
167
+ ```bash
168
+ uip model-hub policy-previews get 11111111-2222-3333-4444-555555555555
169
+ ```
170
+
171
+ **Arguments:**
172
+
173
+ | Argument | Description |
174
+ | ------------- | ------------------------------------ |
175
+ | `<policy-id>` | Governance policy ID to preview. |
176
+
177
+ **Output code:** `ModelHubPolicyPreviewsGet`
178
+
179
+ ## Output & exit codes
180
+
181
+ Success responses follow the standard CLI shape: `{ Result: "Success", Code, Data }`.
182
+ Errors follow `{ Result: "Failure", Message, Instructions }`.
183
+
184
+ | Exit code | Meaning |
185
+ | --------- | ------------------ |
186
+ | `0` | Success |
187
+ | `1` | Failure or error |
188
+
189
+ ## Development
190
+
191
+ ```bash
192
+ bun run build # bundle to dist/ via tools/build-tool.ts
193
+ bun run test # vitest
194
+ bun run lint # biome check
195
+ ```
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ Command,
4
+ metadata,
5
+ registerCommands
6
+ } from "./tool-hhr5mnwx.js";
7
+
8
+ // src/index.ts
9
+ var program = new Command;
10
+ program.name(metadata.commandPrefix).description(metadata.description).version(metadata.version);
11
+ await registerCommands(program);
12
+ program.parse(process.argv);
13
+
14
+ //# debugId=BD084772D1B96E7264756E2164756E21