ur-agent 1.27.4 → 1.27.6
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/CHANGELOG.md +19 -0
- package/README.md +19 -9
- package/dist/cli.js +1955 -1159
- package/docs/CONFIGURATION.md +21 -2
- package/docs/USAGE.md +16 -5
- package/docs/providers.md +55 -54
- package/package.json +1 -1
package/docs/CONFIGURATION.md
CHANGED
|
@@ -10,7 +10,7 @@ UR-AGENT supports official provider access paths only:
|
|
|
10
10
|
and Antigravity CLI where officially supported.
|
|
11
11
|
- Explicit API providers: OpenAI, Anthropic, Gemini, OpenRouter, and
|
|
12
12
|
OpenAI-compatible endpoints.
|
|
13
|
-
- Local providers: Ollama, LM Studio, llama.cpp, and vLLM OpenAI-compatible
|
|
13
|
+
- Local/server providers: Ollama, LM Studio, llama.cpp, and vLLM OpenAI-compatible
|
|
14
14
|
server mode.
|
|
15
15
|
|
|
16
16
|
UR-AGENT never scrapes browser sessions, extracts OAuth refresh tokens, reads
|
|
@@ -54,6 +54,23 @@ Provider values accept canonical IDs and common aliases. Examples:
|
|
|
54
54
|
`agy`, `ollama`, `lmstudio`, `LM Studio`, `llama.cpp`, and `vllm`.
|
|
55
55
|
Values with spaces should be quoted in shell commands.
|
|
56
56
|
|
|
57
|
+
In the interactive app, `/model` is provider-first: choose a provider, then
|
|
58
|
+
choose a model from that provider only. The picker labels providers as
|
|
59
|
+
subscription login, API key, local runtime, or OpenAI-compatible endpoint and
|
|
60
|
+
shows model source as `live`, `cache`, or `static`. Changing providers clears an
|
|
61
|
+
incompatible saved model instead of silently carrying it across providers. The
|
|
62
|
+
saved provider/model pair controls the runtime backend for the next agent
|
|
63
|
+
request; Ollama is only used when `ollama` is the selected provider.
|
|
64
|
+
|
|
65
|
+
Use this to inspect the active runtime path:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
ur provider status
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The status output includes active provider, active model, access type,
|
|
72
|
+
credential type, and runtime backend.
|
|
73
|
+
|
|
57
74
|
API keys are not written to UR settings. Set them in the environment when you
|
|
58
75
|
explicitly choose API mode:
|
|
59
76
|
|
|
@@ -92,7 +109,9 @@ OLLAMA_MODEL=qwen3-coder:480b-cloud
|
|
|
92
109
|
UR_MODEL=qwen3-coder:480b-cloud
|
|
93
110
|
```
|
|
94
111
|
|
|
95
|
-
`OLLAMA_MODEL` selects the model name and takes precedence over `UR_MODEL
|
|
112
|
+
`OLLAMA_MODEL` selects the model name and takes precedence over `UR_MODEL` only
|
|
113
|
+
for Ollama runtime sessions. If neither is set, UR lets its Ollama router choose
|
|
114
|
+
from the model list advertised by the configured Ollama app.
|
|
96
115
|
|
|
97
116
|
### Discovering LAN Ollama servers
|
|
98
117
|
|
package/docs/USAGE.md
CHANGED
|
@@ -51,15 +51,14 @@ ur -p \
|
|
|
51
51
|
|
|
52
52
|
## Models And Providers
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
For Ollama sessions, the wrapper in `bin/ur.js` honors explicit model choices
|
|
55
|
+
in this order:
|
|
55
56
|
|
|
56
57
|
1. `OLLAMA_MODEL`
|
|
57
58
|
2. `UR_MODEL`
|
|
58
59
|
|
|
59
|
-
If neither variable is set
|
|
60
|
-
exposed by your local Ollama app.
|
|
61
|
-
Ollama Cloud-backed models. If routing cannot discover a model list, the
|
|
62
|
-
built-in fallback is `qwen3-coder:480b-cloud`.
|
|
60
|
+
If neither variable is set and `ollama` is the selected provider, UR lets its
|
|
61
|
+
Ollama router choose from the models exposed by your local Ollama app.
|
|
63
62
|
|
|
64
63
|
You can also choose the model for a single session:
|
|
65
64
|
|
|
@@ -110,6 +109,13 @@ ur config set base_url <url>
|
|
|
110
109
|
ur config set provider.fallback ollama
|
|
111
110
|
```
|
|
112
111
|
|
|
112
|
+
In the interactive app, `/model` chooses a provider first and then a model from
|
|
113
|
+
that provider only. The saved pair controls the runtime backend for the next
|
|
114
|
+
agent request. There is no cross-provider fallback: OpenAI API does not fall
|
|
115
|
+
back to Codex CLI or Ollama, Claude Code does not fall back to Claude API, and
|
|
116
|
+
local/server providers do not leak cloud model lists. Use `ur provider status`
|
|
117
|
+
to inspect the active provider, model, access type, and runtime backend.
|
|
118
|
+
|
|
113
119
|
Provider values accept canonical IDs and common aliases. For example,
|
|
114
120
|
`claude`, `Claude Code`, and `claude-code-cli` all select
|
|
115
121
|
`claude-code-cli`; `antigravity`, `agy`, and `antigravity-cli` all select
|
|
@@ -122,6 +128,11 @@ Claude Code, Gemini CLI, or Antigravity where supported. UR-AGENT never scrapes
|
|
|
122
128
|
browser sessions, extracts OAuth tokens, or bypasses provider restrictions.
|
|
123
129
|
OpenAI-compatible local or cloud endpoints use `base_url` plus `model`.
|
|
124
130
|
|
|
131
|
+
Use `/model` in an interactive session to select provider first and model
|
|
132
|
+
second. OpenAI API and Codex CLI, Claude API and Claude Code, and Gemini API and
|
|
133
|
+
Gemini CLI are separate providers; a subscription login does not grant API-key
|
|
134
|
+
access, and an API key does not grant subscription CLI access.
|
|
135
|
+
|
|
125
136
|
## Project Instructions
|
|
126
137
|
|
|
127
138
|
Add a `UR.md` file to the repository root for team-shared instructions. UR loads it as project context.
|
package/docs/providers.md
CHANGED
|
@@ -21,20 +21,20 @@ environment variables only when the user explicitly selects API mode.
|
|
|
21
21
|
|
|
22
22
|
## Provider matrix
|
|
23
23
|
|
|
24
|
-
| Provider | Access type | Legal path |
|
|
25
|
-
| --- | --- | --- |
|
|
26
|
-
|
|
|
27
|
-
| Claude Code | subscription | official Claude Code login |
|
|
28
|
-
| Gemini CLI | subscription | official Gemini Code Assist login |
|
|
29
|
-
| Antigravity | subscription | official Antigravity login, where supported |
|
|
30
|
-
| OpenAI | API | `OPENAI_API_KEY` |
|
|
31
|
-
|
|
|
32
|
-
| Gemini | API | `GEMINI_API_KEY` |
|
|
33
|
-
| OpenRouter | API/router | `OPENROUTER_API_KEY` |
|
|
34
|
-
| Ollama | local | localhost Ollama runtime |
|
|
35
|
-
| LM Studio | local | local OpenAI-compatible server |
|
|
36
|
-
| llama.cpp | local | local OpenAI-compatible server |
|
|
37
|
-
| vLLM | local/server | OpenAI-compatible server |
|
|
24
|
+
| Provider | Access type | Runtime backend | Legal path |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| Codex CLI | subscription | `subscription-cli:codex` | official Codex CLI login |
|
|
27
|
+
| Claude Code | subscription | `subscription-cli:claude-code` | official Claude Code login |
|
|
28
|
+
| Gemini CLI | subscription | `subscription-cli:gemini` | official Gemini Code Assist login |
|
|
29
|
+
| Antigravity | subscription | `subscription-cli:antigravity` | official Antigravity login, where supported |
|
|
30
|
+
| OpenAI API | API | `api:openai` | `OPENAI_API_KEY` |
|
|
31
|
+
| Claude API | API | `api:anthropic` | `ANTHROPIC_API_KEY` |
|
|
32
|
+
| Gemini API | API | `api:gemini` | `GEMINI_API_KEY` |
|
|
33
|
+
| OpenRouter | API/router | `api:openrouter` | `OPENROUTER_API_KEY` |
|
|
34
|
+
| Ollama | local | `ollama` | localhost Ollama runtime |
|
|
35
|
+
| LM Studio | local/server | `openai-compatible:lmstudio` | local OpenAI-compatible server |
|
|
36
|
+
| llama.cpp | local/server | `openai-compatible:llama.cpp` | local OpenAI-compatible server |
|
|
37
|
+
| vLLM | local/server | `openai-compatible:vllm` | OpenAI-compatible server |
|
|
38
38
|
|
|
39
39
|
## Commands
|
|
40
40
|
|
|
@@ -61,15 +61,16 @@ ur config set provider.fallback ollama
|
|
|
61
61
|
|
|
62
62
|
## Provider-scoped model selection
|
|
63
63
|
|
|
64
|
-
UR-AGENT shows only models available for the selected provider. This prevents
|
|
64
|
+
UR-AGENT shows providers first, then only models available for the selected provider. This prevents incompatible model/provider pairs and keeps subscription CLI, API-key, and local/server runtime model lists separate.
|
|
65
65
|
|
|
66
66
|
## Runtime provider routing
|
|
67
67
|
|
|
68
|
-
When you select a provider and model,
|
|
68
|
+
When you select a provider and model, every agent request is routed through that
|
|
69
|
+
provider's backend:
|
|
69
70
|
|
|
70
71
|
- **Subscription providers** spawn the official CLI command
|
|
71
72
|
- **API providers** make direct HTTP API calls with your API key
|
|
72
|
-
- **Local providers** connect to the configured local endpoint
|
|
73
|
+
- **Local/server providers** connect to the configured local or OpenAI-compatible endpoint
|
|
73
74
|
|
|
74
75
|
The selected provider determines:
|
|
75
76
|
- Which backend receives your requests
|
|
@@ -77,7 +78,10 @@ The selected provider determines:
|
|
|
77
78
|
- How authentication works
|
|
78
79
|
- What error messages you see
|
|
79
80
|
|
|
80
|
-
**Important:** Ollama is only used when `ollama` is the selected provider.
|
|
81
|
+
**Important:** Ollama is only used when `ollama` is the selected provider.
|
|
82
|
+
Selecting another provider routes requests through that provider's backend. If
|
|
83
|
+
runtime dispatch fails, UR reports the selected provider, selected model, and
|
|
84
|
+
runtime backend instead of switching to Ollama.
|
|
81
85
|
|
|
82
86
|
### `/model` command flow
|
|
83
87
|
|
|
@@ -86,7 +90,7 @@ When you run `/model` in the interactive agent, you get a **two-step provider-fi
|
|
|
86
90
|
**Step 1: Provider Selection**
|
|
87
91
|
|
|
88
92
|
You see all configured providers with:
|
|
89
|
-
- Provider name (e.g., "
|
|
93
|
+
- Provider name (e.g., "Codex CLI", "OpenAI API", "Ollama")
|
|
90
94
|
- Access type: `subscription`, `api`, `local`, or `server`
|
|
91
95
|
- Connection status: `connected`, `missing`, `unavailable`, or `unknown`
|
|
92
96
|
- Credential type: `cli-login`, `api-key`, `local-runtime`, or `openai-compatible-endpoint`
|
|
@@ -106,6 +110,7 @@ After selecting a model, the confirmation shows:
|
|
|
106
110
|
- Selected provider and access type
|
|
107
111
|
- Selected model name
|
|
108
112
|
- Model source (live/cache/static)
|
|
113
|
+
- Runtime backend
|
|
109
114
|
- Effort level (if applicable)
|
|
110
115
|
- Thinking status (if enabled)
|
|
111
116
|
|
|
@@ -113,23 +118,23 @@ After selecting a model, the confirmation shows:
|
|
|
113
118
|
```
|
|
114
119
|
/model
|
|
115
120
|
→ Step 1: Select provider
|
|
116
|
-
|
|
121
|
+
Codex CLI · subscription · subscription login connected
|
|
117
122
|
OpenAI API · api · OPENAI_API_KEY found
|
|
118
123
|
Ollama · local · localhost reachable
|
|
119
124
|
|
|
120
|
-
→ Select:
|
|
125
|
+
→ Select: Codex CLI
|
|
121
126
|
|
|
122
127
|
→ Step 2: Select model
|
|
123
|
-
gpt-
|
|
124
|
-
gpt-
|
|
125
|
-
o1 · Reasoning model
|
|
128
|
+
codex/gpt-5.5 · Subscription model through official Codex CLI login · static
|
|
129
|
+
codex/gpt-5.4-mini · Fast subscription model through official Codex CLI login · static
|
|
126
130
|
|
|
127
|
-
→ Select: gpt-
|
|
131
|
+
→ Select: codex/gpt-5.5
|
|
128
132
|
|
|
129
133
|
→ Confirmation:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
Selected provider: Codex CLI (subscription)
|
|
135
|
+
Selected model: codex/gpt-5.5
|
|
136
|
+
Model source: static
|
|
137
|
+
Runtime backend: subscription-cli:codex
|
|
133
138
|
```
|
|
134
139
|
|
|
135
140
|
### CLI workflow
|
|
@@ -142,11 +147,11 @@ ur config set provider openai-api
|
|
|
142
147
|
/model
|
|
143
148
|
|
|
144
149
|
# 3. Select a model from the filtered list
|
|
145
|
-
ur config set model gpt-
|
|
150
|
+
ur config set model gpt-5.5
|
|
146
151
|
|
|
147
152
|
# 4. Switch to a different provider - model list updates automatically
|
|
148
153
|
ur config set provider anthropic-api
|
|
149
|
-
# Now /model shows only Claude models, not
|
|
154
|
+
# Now /model shows only Claude API models, not Codex CLI or OpenAI API models
|
|
150
155
|
```
|
|
151
156
|
|
|
152
157
|
### Model discovery behavior
|
|
@@ -155,13 +160,13 @@ ur config set provider anthropic-api
|
|
|
155
160
|
| --- | --- | --- |
|
|
156
161
|
| Subscription CLI (codex-cli, claude-code-cli, gemini-cli, antigravity-cli) | Static list of provider-specific models | static |
|
|
157
162
|
| API providers (openai-api, anthropic-api, gemini-api, openrouter) | Static list of provider-specific models | static |
|
|
158
|
-
| Local providers (ollama, lmstudio, llama.cpp, vllm) | Dynamic discovery from
|
|
163
|
+
| Local/server providers (ollama, lmstudio, llama.cpp, vllm) | Dynamic discovery from the selected provider endpoint | live |
|
|
159
164
|
| OpenAI-compatible | Dynamic discovery from configured endpoint | live |
|
|
160
165
|
|
|
161
166
|
### API vs Subscription distinction
|
|
162
167
|
|
|
163
168
|
**Subscription providers** require official CLI login:
|
|
164
|
-
- `codex-cli` —
|
|
169
|
+
- `codex-cli` — Codex CLI subscription via `codex login`
|
|
165
170
|
- `claude-code-cli` — Claude Code subscription via `claude auth login`
|
|
166
171
|
- `gemini-cli` — Gemini Code Assist enterprise login
|
|
167
172
|
- `antigravity-cli` — Antigravity subscription login
|
|
@@ -172,7 +177,7 @@ ur config set provider anthropic-api
|
|
|
172
177
|
- `gemini-api` — requires `GEMINI_API_KEY`
|
|
173
178
|
- `openrouter` — requires `OPENROUTER_API_KEY`
|
|
174
179
|
|
|
175
|
-
**Local providers** require local runtime:
|
|
180
|
+
**Local/server providers** require local runtime or endpoint:
|
|
176
181
|
- `ollama` — localhost Ollama server
|
|
177
182
|
- `lmstudio` — LM Studio OpenAI-compatible server
|
|
178
183
|
- `llama.cpp` — llama.cpp server mode
|
|
@@ -192,29 +197,25 @@ When you set a model that is incompatible with the current provider, UR-AGENT sh
|
|
|
192
197
|
```
|
|
193
198
|
Invalid model for current provider:
|
|
194
199
|
Selected provider: openai-api
|
|
195
|
-
Selected model: claude-sonnet-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
Selected model: claude-sonnet-5
|
|
201
|
+
Valid models for openai-api: gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-4o, gpt-4o-mini, o1, o3-mini
|
|
202
|
+
Suggested action: Run /model and choose a model from openai-api, or run: ur config set model gpt-5.5
|
|
203
|
+
Error: Model "claude-sonnet-5" is not available for provider "openai-api".
|
|
199
204
|
```
|
|
200
205
|
|
|
201
206
|
When you change providers, UR-AGENT warns if the current model is incompatible:
|
|
202
207
|
|
|
203
208
|
```
|
|
204
|
-
Warning: Current model "gpt-
|
|
205
|
-
Valid models for anthropic-api: claude-sonnet-
|
|
206
|
-
After changing provider, run: ur config set model claude-sonnet-
|
|
209
|
+
Warning: Current model "gpt-5.5" is not available for provider "anthropic-api" and will be cleared.
|
|
210
|
+
Valid models for anthropic-api: claude-sonnet-5, claude-opus-4-8, claude-opus-4-7
|
|
211
|
+
After changing provider, run /model or: ur config set model claude-sonnet-5
|
|
207
212
|
```
|
|
208
213
|
|
|
209
214
|
### Troubleshooting
|
|
210
215
|
|
|
211
216
|
**Check active provider and model:**
|
|
212
217
|
```sh
|
|
213
|
-
# Show
|
|
214
|
-
ur config get provider
|
|
215
|
-
ur config get model
|
|
216
|
-
|
|
217
|
-
# Or use the status command
|
|
218
|
+
# Show selected provider, model, access type, credential, readiness, and backend
|
|
218
219
|
ur provider status
|
|
219
220
|
```
|
|
220
221
|
|
|
@@ -233,25 +234,25 @@ ur provider status
|
|
|
233
234
|
- For local providers, ensure server is running and model is pulled
|
|
234
235
|
|
|
235
236
|
**Requests going to wrong backend:**
|
|
236
|
-
- Verify selected provider: `ur
|
|
237
|
+
- Verify selected provider and runtime backend: `ur provider status`
|
|
237
238
|
- Change provider: `ur config set provider <provider-id>`
|
|
239
|
+
- Choose a scoped model: `/model`
|
|
238
240
|
- The selected provider determines which backend receives requests
|
|
239
241
|
- Ollama is only used when `ollama` is the selected provider
|
|
242
|
+
- Runtime dispatch validates the provider/model pair before sending a request
|
|
240
243
|
|
|
241
244
|
**Dynamic discovery fails:**
|
|
242
|
-
- Local providers: check server is running at configured URL
|
|
245
|
+
- Local/server providers: check server is running at configured URL
|
|
243
246
|
- OpenAI-compatible: verify base_url and API key (if required)
|
|
244
247
|
- Fallback only to same provider's cached models (never other providers)
|
|
245
248
|
|
|
246
249
|
**Debug active runtime backend:**
|
|
247
250
|
```sh
|
|
248
|
-
|
|
249
|
-
ur provider doctor
|
|
250
|
-
|
|
251
|
-
# Check which backend will be used
|
|
252
|
-
# After selecting provider, all requests go through that provider's backend
|
|
251
|
+
ur provider status
|
|
253
252
|
```
|
|
254
253
|
|
|
254
|
+
`ur provider doctor` adds detailed diagnostics for the same selected provider.
|
|
255
|
+
|
|
255
256
|
Provider config and doctor commands accept canonical IDs and common aliases:
|
|
256
257
|
|
|
257
258
|
| Canonical ID | Accepted examples |
|
|
@@ -293,7 +294,7 @@ fallback option.
|
|
|
293
294
|
where installed. It launches only an installed official CLI command where
|
|
294
295
|
supported; UR-AGENT does not invent flags.
|
|
295
296
|
|
|
296
|
-
## API and local providers
|
|
297
|
+
## API and local/server providers
|
|
297
298
|
|
|
298
299
|
API providers require explicit user selection and environment keys:
|
|
299
300
|
|
|
@@ -312,7 +313,7 @@ ur config set base_url http://localhost:1234/v1
|
|
|
312
313
|
ur config set model local-model-name
|
|
313
314
|
```
|
|
314
315
|
|
|
315
|
-
Local providers use their normal
|
|
316
|
+
Local/server providers use their normal endpoints:
|
|
316
317
|
|
|
317
318
|
- Ollama: `http://localhost:11434`
|
|
318
319
|
- LM Studio: `http://localhost:1234/v1`
|
package/package.json
CHANGED