ur-agent 1.27.5 → 1.28.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/CHANGELOG.md +30 -0
- package/README.md +9 -4
- package/dist/cli.js +2565 -1919
- package/docs/CONFIGURATION.md +15 -2
- package/docs/USAGE.md +11 -5
- package/docs/providers.md +35 -30
- package/package.json +1 -1
package/docs/CONFIGURATION.md
CHANGED
|
@@ -58,7 +58,18 @@ In the interactive app, `/model` is provider-first: choose a provider, then
|
|
|
58
58
|
choose a model from that provider only. The picker labels providers as
|
|
59
59
|
subscription login, API key, local runtime, or OpenAI-compatible endpoint and
|
|
60
60
|
shows model source as `live`, `cache`, or `static`. Changing providers clears an
|
|
61
|
-
incompatible saved model instead of silently carrying it across providers.
|
|
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.
|
|
62
73
|
|
|
63
74
|
API keys are not written to UR settings. Set them in the environment when you
|
|
64
75
|
explicitly choose API mode:
|
|
@@ -98,7 +109,9 @@ OLLAMA_MODEL=qwen3-coder:480b-cloud
|
|
|
98
109
|
UR_MODEL=qwen3-coder:480b-cloud
|
|
99
110
|
```
|
|
100
111
|
|
|
101
|
-
`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.
|
|
102
115
|
|
|
103
116
|
### Discovering LAN Ollama servers
|
|
104
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
|
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
|
-
| Codex CLI | subscription | official Codex CLI login |
|
|
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
|
|
|
@@ -65,11 +65,12 @@ UR-AGENT shows providers first, then only models available for the selected prov
|
|
|
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
|
-
- **Subscription providers** spawn the official CLI command
|
|
71
|
-
- **API providers** make direct HTTP
|
|
72
|
-
- **Local/server providers** connect to the configured local or OpenAI-compatible endpoint
|
|
71
|
+
- **Subscription providers** spawn the official CLI command (e.g. `codex`, `claude`, `gemini`) in non-interactive mode, pass the prompt and the provider-scoped model, and map its stdout to the response. A non-zero exit or empty output fails clearly — it is never replaced with placeholder text.
|
|
72
|
+
- **API providers** make direct HTTP calls in each provider's native wire format: Anthropic uses `x-api-key` + `anthropic-version` against `/v1/messages`; OpenAI uses `Authorization: Bearer` against `/v1/chat/completions`; Gemini uses `x-goog-api-key` against `…:generateContent`; OpenRouter uses its OpenAI-compatible chat endpoint.
|
|
73
|
+
- **Local/server providers** connect to the configured local or OpenAI-compatible endpoint (`/v1/chat/completions` for LM Studio, llama.cpp and vLLM; the native tags/chat API for Ollama)
|
|
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
|
|
|
@@ -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
|
|
|
@@ -129,6 +134,7 @@ After selecting a model, the confirmation shows:
|
|
|
129
134
|
Selected provider: Codex CLI (subscription)
|
|
130
135
|
Selected model: codex/gpt-5.5
|
|
131
136
|
Model source: static
|
|
137
|
+
Runtime backend: subscription-cli:codex
|
|
132
138
|
```
|
|
133
139
|
|
|
134
140
|
### CLI workflow
|
|
@@ -209,11 +215,7 @@ Warning: Current model "gpt-5.5" is not available for provider "anthropic-api" a
|
|
|
209
215
|
|
|
210
216
|
**Check active provider and model:**
|
|
211
217
|
```sh
|
|
212
|
-
# Show
|
|
213
|
-
ur config get provider
|
|
214
|
-
ur config get model
|
|
215
|
-
|
|
216
|
-
# Or use the status command
|
|
218
|
+
# Show selected provider, model, access type, credential, readiness, and backend
|
|
217
219
|
ur provider status
|
|
218
220
|
```
|
|
219
221
|
|
|
@@ -232,25 +234,28 @@ ur provider status
|
|
|
232
234
|
- For local providers, ensure server is running and model is pulled
|
|
233
235
|
|
|
234
236
|
**Requests going to wrong backend:**
|
|
235
|
-
- Verify selected provider: `ur
|
|
237
|
+
- Verify selected provider and runtime backend: `ur provider status`
|
|
236
238
|
- Change provider: `ur config set provider <provider-id>`
|
|
239
|
+
- Choose a scoped model: `/model`
|
|
237
240
|
- The selected provider determines which backend receives requests
|
|
238
241
|
- Ollama is only used when `ollama` is the selected provider
|
|
242
|
+
- Runtime dispatch validates the provider/model pair before sending a request
|
|
239
243
|
|
|
240
244
|
**Dynamic discovery fails:**
|
|
241
245
|
- Local/server providers: check server is running at configured URL
|
|
242
246
|
- OpenAI-compatible: verify base_url and API key (if required)
|
|
243
247
|
- Fallback only to same provider's cached models (never other providers)
|
|
244
248
|
|
|
249
|
+
**Saved local/server model rejected after restart:**
|
|
250
|
+
- A model saved via `/model` for a live-discovery provider (`ollama`, `lmstudio`, `llama.cpp`, `vllm`, `openai-compatible`) is accepted on a fresh process even before discovery has repopulated the in-memory model cache. The endpoint is the source of truth, so a saved model is not rejected pre-discovery. Static providers (API/subscription) remain strictly validated against their model list.
|
|
251
|
+
|
|
245
252
|
**Debug active runtime backend:**
|
|
246
253
|
```sh
|
|
247
|
-
|
|
248
|
-
ur provider doctor
|
|
249
|
-
|
|
250
|
-
# Check which backend will be used
|
|
251
|
-
# After selecting provider, all requests go through that provider's backend
|
|
254
|
+
ur provider status
|
|
252
255
|
```
|
|
253
256
|
|
|
257
|
+
`ur provider doctor` adds detailed diagnostics for the same selected provider.
|
|
258
|
+
|
|
254
259
|
Provider config and doctor commands accept canonical IDs and common aliases:
|
|
255
260
|
|
|
256
261
|
| Canonical ID | Accepted examples |
|
package/package.json
CHANGED