ur-agent 1.84.4 → 1.84.5

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/cli.js CHANGED
@@ -60895,7 +60895,8 @@ function getActiveProviderSettings(settings = getInitialSettings()) {
60895
60895
  fallback,
60896
60896
  openaiTransport: configured.openaiTransport,
60897
60897
  responses: configured.responses,
60898
- openrouter: configured.openrouter
60898
+ openrouter: configured.openrouter,
60899
+ anthropic: configured.anthropic
60899
60900
  };
60900
60901
  }
60901
60902
  function getProviderRuntimeInfo(settings = getInitialSettings()) {
@@ -61218,6 +61219,20 @@ function setSafeProviderConfig(key, value, options = {}) {
61218
61219
  }
61219
61220
  }
61220
61221
  };
61222
+ } else if (key === "anthropic.speed") {
61223
+ if (trimmed !== "standard" && trimmed !== "fast") {
61224
+ return {
61225
+ ok: false,
61226
+ message: "anthropic.speed must be standard or fast."
61227
+ };
61228
+ }
61229
+ settings = {
61230
+ provider: {
61231
+ anthropic: {
61232
+ speed: trimmed
61233
+ }
61234
+ }
61235
+ };
61221
61236
  } else if (key === "model") {
61222
61237
  const currentSettings = getInitialSettings();
61223
61238
  const currentProvider = getActiveProviderSettings(currentSettings).active ?? "ollama";
@@ -61369,77 +61384,14 @@ function isNvidiaHostedApi(baseUrl) {
61369
61384
  return false;
61370
61385
  }
61371
61386
  }
61372
- function normalizeNvidiaIdentifier(value) {
61373
- return value.toLowerCase().replace(/[^a-z0-9]+/gu, "");
61374
- }
61375
61387
  function isNvidiaAgentModelCandidate(modelId) {
61376
61388
  return !/(?:^|[/_.-])(?:calibration|deplot|detector|embed(?:ding|qa)?|guard|nemoguard|nemoretriever|nvclip|ocr|parse|rerank|retriever|reward|safety|translate)(?:$|[/_.-])/iu.test(modelId);
61377
61389
  }
61378
- function parseNvidiaActiveFunctionInventory(value) {
61379
- if (!value || typeof value !== "object" || Array.isArray(value)) {
61380
- throw new Error("NVIDIA account function inventory returned an invalid response.");
61381
- }
61382
- const functions = value.functions;
61383
- if (!Array.isArray(functions)) {
61384
- throw new Error("NVIDIA account function inventory omitted its functions list.");
61385
- }
61386
- const active = functions.filter((entry) => {
61387
- if (!entry || typeof entry !== "object" || Array.isArray(entry))
61388
- return false;
61389
- return String(entry.status ?? "").toUpperCase() === "ACTIVE";
61390
- });
61391
- const descriptors2 = active.flatMap((entry) => {
61392
- const record2 = entry;
61393
- const values = [
61394
- ...typeof record2.name === "string" ? [record2.name] : [],
61395
- ...Array.isArray(record2.tags) ? record2.tags.filter((tag) => typeof tag === "string") : typeof record2.tags === "string" ? [record2.tags] : []
61396
- ];
61397
- return values.map(normalizeNvidiaIdentifier).filter(Boolean);
61398
- });
61399
- return {
61400
- activeFunctionCount: active.length,
61401
- descriptors: [...new Set(descriptors2)]
61402
- };
61403
- }
61404
- async function fetchNvidiaActiveFunctionInventory(fetchImpl, apiKey, signal) {
61405
- let response;
61406
- try {
61407
- response = await fetchImpl(NVIDIA_FUNCTIONS_URL, {
61408
- method: "GET",
61409
- signal,
61410
- headers: { Authorization: `Bearer ${apiKey}` }
61411
- });
61412
- } catch (error61) {
61413
- throw new Error(`NVIDIA account function inventory is unreachable: ${error61 instanceof Error ? error61.message : String(error61)}`);
61414
- }
61415
- if (!response.ok) {
61416
- throw new Error(`NVIDIA account function inventory returned HTTP ${response.status}.`);
61417
- }
61418
- let body;
61419
- try {
61420
- body = await response.json();
61421
- } catch {
61422
- throw new Error("NVIDIA account function inventory returned malformed JSON.");
61423
- }
61424
- return parseNvidiaActiveFunctionInventory(body);
61425
- }
61426
- function filterNvidiaHostedModels(models, inventory) {
61427
- if (inventory.activeFunctionCount === 0 || inventory.descriptors.length === 0) {
61428
- return [];
61429
- }
61430
- return models.flatMap((model) => {
61431
- if (!isNvidiaAgentModelCandidate(model.id))
61432
- return [];
61433
- const basename4 = model.id.split("/").at(-1) ?? model.id;
61434
- const normalizedModel = normalizeNvidiaIdentifier(basename4);
61435
- if (!normalizedModel || !inventory.descriptors.some((descriptor) => descriptor.includes(normalizedModel))) {
61436
- return [];
61437
- }
61438
- return [{
61439
- ...model,
61440
- description: `${model.description} \xB7 active for connected NVIDIA account`
61441
- }];
61442
- });
61390
+ function filterNvidiaHostedModels(models) {
61391
+ return models.flatMap((model) => isNvidiaAgentModelCandidate(model.id) ? [{
61392
+ ...model,
61393
+ description: model.isDefault ? `${model.description} \xB7 NVIDIA hosted chat catalog \xB7 NVIDIA's fastest 30B agent model` : `${model.description} \xB7 NVIDIA hosted chat catalog`
61394
+ }] : []).sort((left, right) => Number(Boolean(right.isDefault)) - Number(Boolean(left.isDefault)));
61443
61395
  }
61444
61396
  async function checkEndpoint(definition, settings, adapters, result) {
61445
61397
  if (!definition.endpointKind)
@@ -61535,32 +61487,22 @@ async function checkEndpoint(definition, settings, adapters, result) {
61535
61487
  message: `${reachableUrl} is reachable but returned no models. Load a model in the server, or check that base_url includes the API path (e.g. /v1).`
61536
61488
  });
61537
61489
  }
61538
- const verifiesNvidiaAccountFunctions = definition.id === "nvidia-nim" && isNvidiaHostedApi(baseUrl);
61539
- if (verifiesNvidiaAccountFunctions && modelsUrl && apiKey) {
61540
- try {
61541
- const inventory = await fetchNvidiaActiveFunctionInventory(fetchImpl, apiKey, AbortSignal.timeout(1e4));
61542
- detectedModels = filterNvidiaHostedModels(detectedModels, inventory);
61543
- if (detectedModels.length === 0) {
61544
- result.checks.push({
61545
- name: "account_models",
61546
- status: "fail",
61547
- message: "NVIDIA returned no active chat models for this account."
61548
- });
61549
- addFailure(result, "NVIDIA account has no active chat models", "Confirm the key at build.nvidia.com, then reconnect with: ur connect nvidia-nim");
61550
- } else {
61551
- result.checks.push({
61552
- name: "account_models",
61553
- status: "pass",
61554
- message: `${detectedModels.length} account-active NVIDIA chat models are selectable.`
61555
- });
61556
- }
61557
- } catch (error61) {
61490
+ const verifiesNvidiaHostedCatalog = definition.id === "nvidia-nim" && isNvidiaHostedApi(baseUrl);
61491
+ if (verifiesNvidiaHostedCatalog && modelsUrl) {
61492
+ detectedModels = filterNvidiaHostedModels(detectedModels);
61493
+ if (detectedModels.length === 0) {
61558
61494
  result.checks.push({
61559
- name: "account_models",
61495
+ name: "chat_models",
61560
61496
  status: "fail",
61561
- message: error61 instanceof Error ? error61.message : String(error61)
61497
+ message: "NVIDIA returned no agent-capable chat models."
61498
+ });
61499
+ addFailure(result, "NVIDIA hosted catalog has no agent-capable chat models", "Refresh the key at build.nvidia.com, then reconnect with: ur connect nvidia-nim");
61500
+ } else {
61501
+ result.checks.push({
61502
+ name: "chat_models",
61503
+ status: "pass",
61504
+ message: `${detectedModels.length} NVIDIA hosted chat models are selectable.`
61562
61505
  });
61563
- addFailure(result, "NVIDIA account model inventory unavailable", "Reconnect the build.nvidia.com key with: ur connect nvidia-nim");
61564
61506
  }
61565
61507
  }
61566
61508
  if (settings.model) {
@@ -61568,11 +61510,11 @@ async function checkEndpoint(definition, settings, adapters, result) {
61568
61510
  if (modelsUrl && !modelDetected) {
61569
61511
  result.checks.push({
61570
61512
  name: "model",
61571
- status: verifiesNvidiaAccountFunctions ? "fail" : "warn",
61572
- message: verifiesNvidiaAccountFunctions ? `Model "${settings.model}" is not an account-active NVIDIA chat model.` : `Model "${settings.model}" was not found in the detectable model list.`
61513
+ status: verifiesNvidiaHostedCatalog ? "fail" : "warn",
61514
+ message: verifiesNvidiaHostedCatalog ? `Model "${settings.model}" is not present in NVIDIA's hosted chat catalog.` : `Model "${settings.model}" was not found in the detectable model list.`
61573
61515
  });
61574
- if (verifiesNvidiaAccountFunctions) {
61575
- addFailure(result, "selected NVIDIA NIM model is inactive", "Run /model, choose NVIDIA NIM, and select an account-active model.");
61516
+ if (verifiesNvidiaHostedCatalog) {
61517
+ addFailure(result, "selected NVIDIA NIM model is unavailable", "Refresh /model, choose NVIDIA NIM, and select a model returned by NVIDIA.");
61576
61518
  }
61577
61519
  } else if (modelsUrl) {
61578
61520
  result.checks.push({
@@ -62229,6 +62171,7 @@ function modelDefinitionsFromDiscovered(models, provider) {
62229
62171
  id: model.id,
62230
62172
  displayName: model.displayName,
62231
62173
  description: model.description,
62174
+ ...curated?.isDefault ? { isDefault: true } : {},
62232
62175
  pricing: model.pricing,
62233
62176
  ...model.contextLength ? { contextLength: model.contextLength } : {},
62234
62177
  ...model.outputTokenLimit ? { outputTokenLimit: model.outputTokenLimit } : {},
@@ -62598,11 +62541,7 @@ async function discoverLiveModelsForProvider(provider, options = {}) {
62598
62541
  if (discovered.length > 0) {
62599
62542
  const models = modelDefinitionsFromDiscovered(discovered, provider);
62600
62543
  if (provider === "nvidia-nim" && isNvidiaHostedApi(baseUrl)) {
62601
- if (!apiKey) {
62602
- throw new Error("NVIDIA hosted model discovery requires an API key.");
62603
- }
62604
- const inventory = await fetchNvidiaActiveFunctionInventory(fetchImpl, apiKey, options.signal);
62605
- return filterNvidiaHostedModels(models, inventory);
62544
+ return filterNvidiaHostedModels(models);
62606
62545
  }
62607
62546
  return models;
62608
62547
  }
@@ -62998,7 +62937,7 @@ function setProviderModel(providerId, modelId, options = {}) {
62998
62937
  modelSource: options.modelSource ?? "static"
62999
62938
  };
63000
62939
  }
63001
- var PROVIDER_IDS, DEFAULT_PROVIDER_ID = "ollama", UR_NATIVE_PROVIDER_BOUNDARY = "UR-native runtime: UR owns provider request shaping, native tool-call parsing, native streaming, and UR-run tool permission/sandbox/verifier flow.", SUBSCRIPTION_CLI_PROVIDER_BOUNDARY = "External vendor CLI boundary: UR passes prompt text to the official CLI and receives final text output. UR-native tool calling, UR Bash/File tool execution, UR-native streaming, local command permissions, sandbox guarantees, and verifier/done-gate checks apply to UR-run tools/final UR output, not to actions the external CLI performs internally.", UNCONFIGURED_SUBSCRIPTION_PROVIDER_BOUNDARY = "Unconfigured subscription placeholder: no runtime is attached. Choose a specific subscription CLI, API, local, or server provider.", UR_NATIVE_CAPABILITIES, SUBSCRIPTION_CLI_CAPABILITIES, SUBSCRIPTION_PLACEHOLDER_CAPABILITIES, PROVIDERS, PROVIDER_ALIAS_ENTRIES, PROVIDER_ALIASES, PROVIDER_FAMILIES, NVIDIA_HOSTED_API_HOST = "integrate.api.nvidia.com", NVIDIA_FUNCTIONS_URL = "https://api.nvcf.nvidia.com/v2/nvcf/functions?visibility=authorized&visibility=public", EFFORT_LOW_MEDIUM_HIGH, EFFORT_LOW_MEDIUM_HIGH_XHIGH, EFFORT_LOW_MEDIUM_HIGH_MAX, EFFORT_LOW_MEDIUM_HIGH_XHIGH_MAX, OPENAI_GPT_56_EFFORTS, GEMINI_MINIMAL_TO_HIGH, NVIDIA_NONE_LOW_HIGH, NVIDIA_NONE_HIGH_MAX, NVIDIA_FULL_EFFORT_RANGE, PROVIDER_MODELS, cachedModelsByProvider, cachedModelsWrittenAt, unavailableModelsByEndpoint, modelDiscoveryCoalescer, MODEL_DISCOVERY_TIMEOUT_MS = 15000, validateProviderModelCompatibility;
62940
+ var PROVIDER_IDS, DEFAULT_PROVIDER_ID = "ollama", UR_NATIVE_PROVIDER_BOUNDARY = "UR-native runtime: UR owns provider request shaping, native tool-call parsing, native streaming, and UR-run tool permission/sandbox/verifier flow.", SUBSCRIPTION_CLI_PROVIDER_BOUNDARY = "External vendor CLI boundary: UR passes prompt text to the official CLI and receives final text output. UR-native tool calling, UR Bash/File tool execution, UR-native streaming, local command permissions, sandbox guarantees, and verifier/done-gate checks apply to UR-run tools/final UR output, not to actions the external CLI performs internally.", UNCONFIGURED_SUBSCRIPTION_PROVIDER_BOUNDARY = "Unconfigured subscription placeholder: no runtime is attached. Choose a specific subscription CLI, API, local, or server provider.", UR_NATIVE_CAPABILITIES, SUBSCRIPTION_CLI_CAPABILITIES, SUBSCRIPTION_PLACEHOLDER_CAPABILITIES, PROVIDERS, PROVIDER_ALIAS_ENTRIES, PROVIDER_ALIASES, PROVIDER_FAMILIES, NVIDIA_HOSTED_API_HOST = "integrate.api.nvidia.com", EFFORT_LOW_MEDIUM_HIGH, EFFORT_LOW_MEDIUM_HIGH_XHIGH, EFFORT_LOW_MEDIUM_HIGH_MAX, EFFORT_LOW_MEDIUM_HIGH_XHIGH_MAX, OPENAI_GPT_56_EFFORTS, GEMINI_MINIMAL_TO_HIGH, NVIDIA_NONE_LOW_HIGH, NVIDIA_NONE_HIGH_MAX, NVIDIA_FULL_EFFORT_RANGE, PROVIDER_MODELS, cachedModelsByProvider, cachedModelsWrittenAt, unavailableModelsByEndpoint, modelDiscoveryCoalescer, MODEL_DISCOVERY_TIMEOUT_MS = 15000, validateProviderModelCompatibility;
63002
62941
  var init_providerRegistry = __esm(() => {
63003
62942
  init_execFileNoThrow();
63004
62943
  init_ollamaConfig();
@@ -63561,6 +63500,8 @@ var init_providerRegistry = __esm(() => {
63561
63500
  { id: "google/gemini-2.5-pro", displayName: "Gemini 2.5 Pro", description: "Google Gemini via OpenRouter" }
63562
63501
  ],
63563
63502
  "nvidia-nim": [
63503
+ { id: "nvidia/nemotron-3.5-lightning-30b-a3b", displayName: "nvidia/nemotron-3.5-lightning-30b-a3b", description: "NVIDIA-documented fastest 30B agent model", isDynamic: true, isDefault: true, reasoning: { supportsThinking: true, defaultEnabled: true } },
63504
+ { id: "moonshotai/kimi-k3", displayName: "moonshotai/kimi-k3", description: "NVIDIA-documented mandatory reasoning contract", isDynamic: true, reasoning: { supportsThinking: true, supportedEfforts: ["low", "high", "max"], mandatory: true } },
63564
63505
  { id: "openai/gpt-oss-20b", displayName: "openai/gpt-oss-20b", description: "NVIDIA-documented reasoning contract", isDynamic: true, reasoning: { supportedEfforts: ["low", "medium", "high"], defaultEffort: "medium" } },
63565
63506
  { id: "openai/gpt-oss-120b", displayName: "openai/gpt-oss-120b", description: "NVIDIA-documented reasoning contract", isDynamic: true, reasoning: { supportedEfforts: ["low", "medium", "high"], defaultEffort: "medium" } },
63566
63507
  { id: "nvidia/nemotron-3-super-120b-a12b", displayName: "nvidia/nemotron-3-super-120b-a12b", description: "NVIDIA-documented reasoning contract", isDynamic: true, reasoning: NVIDIA_NONE_LOW_HIGH },
@@ -231354,7 +231295,7 @@ var init_metadata = __esm(() => {
231354
231295
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
231355
231296
  WHITESPACE_REGEX2 = /\s+/;
231356
231297
  getVersionBase = memoize_default(() => {
231357
- const match = "1.84.4".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
231298
+ const match = "1.84.5".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
231358
231299
  return match ? match[0] : undefined;
231359
231300
  });
231360
231301
  buildEnvContext = memoize_default(async () => {
@@ -231394,7 +231335,7 @@ var init_metadata = __esm(() => {
231394
231335
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
231395
231336
  isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
231396
231337
  isURAiAuth: isURAISubscriber(),
231397
- version: "1.84.4",
231338
+ version: "1.84.5",
231398
231339
  versionBase: getVersionBase(),
231399
231340
  buildTime: "",
231400
231341
  deploymentEnvironment: env2.detectDeploymentEnvironment(),
@@ -238833,7 +238774,7 @@ function getAttributionHeader(fingerprint) {
238833
238774
  if (!isAttributionHeaderEnabled()) {
238834
238775
  return "";
238835
238776
  }
238836
- const version2 = `${"1.84.4"}.${fingerprint}`;
238777
+ const version2 = `${"1.84.5"}.${fingerprint}`;
238837
238778
  const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
238838
238779
  const cch = "";
238839
238780
  const workload = getWorkload();
@@ -260068,8 +260009,10 @@ var init_modelSupportOverrides = __esm(() => {
260068
260009
  function resolveThinkingArrowValue(direction) {
260069
260010
  return direction === "right";
260070
260011
  }
260071
- function providerSupportsThinkingToggle(provider) {
260072
- return provider === "ollama" || provider === "anthropic-api";
260012
+ function providerSupportsThinkingToggle(provider, model) {
260013
+ if (provider === "ollama" || provider === "anthropic-api")
260014
+ return true;
260015
+ return provider === "nvidia-nim" && /^nvidia\/nemotron-3\.5-lightning-30b-a3b(?:-|$)/iu.test(model ?? "");
260073
260016
  }
260074
260017
  function resolveSessionThinkingConfig(configured, enabled) {
260075
260018
  if (enabled === false)
@@ -262042,7 +261985,7 @@ async function createOpenAICompatibleClient(options2) {
262042
261985
  if (isUnavailableNvidiaFunction(response, body)) {
262043
261986
  const modelId = typeof model === "string" && model.trim() ? model.trim() : "selected model";
262044
261987
  markProviderModelUnavailable(providerId, modelId, options2.baseUrl);
262045
- return `NVIDIA NIM model "${modelId}" is not active for this account. UR removed it from this session's catalog; run /model and choose an account-active NVIDIA model.`;
261988
+ return `NVIDIA NIM model "${modelId}" is unavailable to this account. UR removed it from this session's catalog; refresh /model and choose another NVIDIA-hosted model.`;
262046
261989
  }
262047
261990
  return `OpenAI-compatible${streaming ? " streaming" : ""} request failed for ${endpoint} (${response.status}): ${body || response.statusText}`;
262048
261991
  };
@@ -262135,7 +262078,7 @@ async function createOpenAICompatibleClient(options2) {
262135
262078
  source: "local-estimate"
262136
262079
  };
262137
262080
  };
262138
- if (providerId !== "llama.cpp" && providerId !== "vllm" && providerId !== "nvidia-nim") {
262081
+ if (providerId !== "llama.cpp" && providerId !== "vllm") {
262139
262082
  return estimate();
262140
262083
  }
262141
262084
  try {
@@ -262205,6 +262148,11 @@ function toOpenAICompatibleRequest(params, providerName = "openai-compatible", o
262205
262148
  const openRouterServiceTier = providerName === "openrouter" ? params.service_tier ?? options2.openrouter?.serviceTier : undefined;
262206
262149
  const openRouterSpeed = providerName === "openrouter" ? params.speed ?? options2.openrouter?.speed : undefined;
262207
262150
  const nvidiaCodingAgentTemplate = providerName === "nvidia-nim" && /^nvidia\/nemotron-3-(?:super|ultra)(?:-|$)/iu.test(String(params.model ?? "")) && tools.length > 0 ? { force_nonempty_content: true } : undefined;
262151
+ const nvidiaLightningThinking = providerName === "nvidia-nim" && /^nvidia\/nemotron-3\.5-lightning-30b-a3b(?:-|$)/iu.test(String(params.model ?? "")) && (params.thinking?.type === "disabled" || params.thinking?.type === "enabled" || params.thinking?.type === "adaptive") ? { enable_thinking: params.thinking.type !== "disabled" } : undefined;
262152
+ const nvidiaChatTemplate = nvidiaCodingAgentTemplate || nvidiaLightningThinking ? {
262153
+ ...nvidiaCodingAgentTemplate,
262154
+ ...nvidiaLightningThinking
262155
+ } : undefined;
262208
262156
  return {
262209
262157
  model: params.model,
262210
262158
  messages: toOpenAIMessages(params, providerName),
@@ -262222,8 +262170,8 @@ function toOpenAICompatibleRequest(params, providerName = "openai-compatible", o
262222
262170
  ...openRouterSessionId && { session_id: openRouterSessionId },
262223
262171
  ...openRouterServiceTier && openRouterServiceTier !== "auto" ? { service_tier: openRouterServiceTier } : {},
262224
262172
  ...openRouterSpeed === "fast" ? { speed: "fast" } : {},
262225
- ...nvidiaCodingAgentTemplate && {
262226
- chat_template_kwargs: nvidiaCodingAgentTemplate
262173
+ ...nvidiaChatTemplate && {
262174
+ chat_template_kwargs: nvidiaChatTemplate
262227
262175
  },
262228
262176
  stream: Boolean(params.stream),
262229
262177
  ...params.stream && providerName !== "openrouter" ? { stream_options: { include_usage: true } } : {},
@@ -272294,6 +272242,9 @@ var init_types4 = __esm(() => {
272294
272242
  serviceTier: exports_external.enum(["auto", "default", "flex", "priority", "fast"]).optional().describe("OpenRouter upstream service tier; priority may cost more and is model-dependent."),
272295
272243
  speed: exports_external.enum(["standard", "fast"]).optional().describe("Request OpenRouter fast mode on models that explicitly support it.")
272296
272244
  }).optional().describe("OpenRouter performance and routing controls."),
272245
+ anthropic: exports_external.object({
272246
+ speed: exports_external.enum(["standard", "fast"]).optional().describe("Anthropic inference speed. Fast is an opt-in, premium research preview available only to enabled accounts and supported Opus models.")
272247
+ }).optional().describe("Anthropic API performance controls."),
272297
272248
  preferences: exports_external.record(exports_external.string(), NonSecretPreferenceSchema).optional().describe("Non-secret provider preferences only")
272298
272249
  }).optional().describe("Legal provider configuration; credentials must stay in environment variables or official CLIs"),
272299
272250
  availableModels: exports_external.array(exports_external.string()).optional().describe("Allowlist of models that users can select. " + "Accepts exact provider-scoped model IDs and provider-specific aliases. " + "If undefined, all models are available. If empty array, only the default model is available. " + "Typically set in managed settings by enterprise administrators."),
@@ -304912,7 +304863,7 @@ function getTelemetryAttributes() {
304912
304863
  attributes["session.id"] = sessionId;
304913
304864
  }
304914
304865
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
304915
- attributes["app.version"] = "1.84.4";
304866
+ attributes["app.version"] = "1.84.5";
304916
304867
  }
304917
304868
  const oauthAccount = getOauthAccountInfo();
304918
304869
  if (oauthAccount) {
@@ -307943,7 +307894,7 @@ var require_src3 = __commonJS((exports) => {
307943
307894
  function getInstruments() {
307944
307895
  if (instruments)
307945
307896
  return instruments;
307946
- const meter = import_api2.metrics.getMeter("ur-agent.gen_ai", "1.84.4");
307897
+ const meter = import_api2.metrics.getMeter("ur-agent.gen_ai", "1.84.5");
307947
307898
  instruments = {
307948
307899
  operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
307949
307900
  description: "GenAI operation duration.",
@@ -308041,7 +307992,7 @@ function genAiAgentAttributes() {
308041
307992
  "gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
308042
307993
  "gen_ai.provider.name": "ur",
308043
307994
  "gen_ai.agent.name": "UR-Nexus",
308044
- "gen_ai.agent.version": "1.84.4"
307995
+ "gen_ai.agent.version": "1.84.5"
308045
307996
  };
308046
307997
  }
308047
307998
  function genAiWorkflowAttributes(workflowName, workflowRunId) {
@@ -308062,7 +308013,7 @@ function genAiWorkflowAttributes(workflowName, workflowRunId) {
308062
308013
  function startGenAiWorkflowSpan(workflowName, workflowRunId) {
308063
308014
  const attributes = genAiWorkflowAttributes(workflowName, workflowRunId);
308064
308015
  const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
308065
- return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.4").startSpan(name, { kind: import_api2.SpanKind.INTERNAL, attributes });
308016
+ return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.5").startSpan(name, { kind: import_api2.SpanKind.INTERNAL, attributes });
308066
308017
  }
308067
308018
  function endGenAiWorkflowSpan(span, options2 = {}) {
308068
308019
  try {
@@ -308100,7 +308051,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
308100
308051
  if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
308101
308052
  attributes["gen_ai.memory.record.count"] = options2.recordCount;
308102
308053
  }
308103
- return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.4").startSpan(operation, { kind: import_api2.SpanKind.INTERNAL, attributes });
308054
+ return import_api2.trace.getTracer("ur-agent.gen_ai", "1.84.5").startSpan(operation, { kind: import_api2.SpanKind.INTERNAL, attributes });
308104
308055
  }
308105
308056
  function endGenAiMemorySpan(span, options2 = {}) {
308106
308057
  try {
@@ -322507,7 +322458,7 @@ async function createRuntime() {
322507
322458
  bootstrapTelemetry();
322508
322459
  const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
322509
322460
  [import_semantic_conventions6.ATTR_SERVICE_NAME]: "ur-agent",
322510
- [import_semantic_conventions6.ATTR_SERVICE_VERSION]: "1.84.4"
322461
+ [import_semantic_conventions6.ATTR_SERVICE_VERSION]: "1.84.5"
322511
322462
  }));
322512
322463
  const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
322513
322464
  resource,
@@ -322540,11 +322491,11 @@ async function createRuntime() {
322540
322491
  setMeterProvider(meterProvider);
322541
322492
  setLoggerProvider(loggerProvider);
322542
322493
  if (meterProvider) {
322543
- const meter = meterProvider.getMeter("ur-agent", "1.84.4");
322494
+ const meter = meterProvider.getMeter("ur-agent", "1.84.5");
322544
322495
  setMeter(meter, (name, options2) => meter.createCounter(name, options2));
322545
322496
  }
322546
322497
  if (loggerProvider) {
322547
- setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.84.4"));
322498
+ setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.84.5"));
322548
322499
  }
322549
322500
  if (!cleanupRegistered4) {
322550
322501
  cleanupRegistered4 = true;
@@ -323093,7 +323044,7 @@ function isAnyTracingEnabled() {
323093
323044
  return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
323094
323045
  }
323095
323046
  function getTracer() {
323096
- return import_api32.trace.getTracer("ur-agent.gen_ai", "1.84.4");
323047
+ return import_api32.trace.getTracer("ur-agent.gen_ai", "1.84.5");
323097
323048
  }
323098
323049
  function createSpanAttributes(spanType, customAttributes = {}) {
323099
323050
  const baseAttributes = getTelemetryAttributes();
@@ -335099,7 +335050,7 @@ function computeFingerprint(messageText2, version2) {
335099
335050
  }
335100
335051
  function computeFingerprintFromMessages(messages) {
335101
335052
  const firstMessageText = extractFirstMessageText(messages);
335102
- return computeFingerprint(firstMessageText, "1.84.4");
335053
+ return computeFingerprint(firstMessageText, "1.84.5");
335103
335054
  }
335104
335055
  var FINGERPRINT_SALT = "59cf53e54c78";
335105
335056
  var init_fingerprint = () => {};
@@ -335141,7 +335092,7 @@ async function sideQuery(opts) {
335141
335092
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
335142
335093
  }
335143
335094
  const messageText2 = extractFirstUserMessageText(messages);
335144
- const fingerprint = computeFingerprint(messageText2, "1.84.4");
335095
+ const fingerprint = computeFingerprint(messageText2, "1.84.5");
335145
335096
  const attributionHeader = getAttributionHeader(fingerprint);
335146
335097
  const systemBlocks = [
335147
335098
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -337248,7 +337199,7 @@ var init_user = __esm(() => {
337248
337199
  deviceId,
337249
337200
  sessionId: getSessionId(),
337250
337201
  email: getEmail(),
337251
- appVersion: "1.84.4",
337202
+ appVersion: "1.84.5",
337252
337203
  platform: getHostPlatformForAnalytics(),
337253
337204
  organizationUuid,
337254
337205
  accountUuid,
@@ -338008,7 +337959,7 @@ var init_growthbook_experiment_event = __esm(() => {
338008
337959
 
338009
337960
  // src/utils/userAgent.ts
338010
337961
  function getURCodeUserAgent() {
338011
- return `ur/${"1.84.4"}`;
337962
+ return `ur/${"1.84.5"}`;
338012
337963
  }
338013
337964
 
338014
337965
  // src/services/analytics/firstPartyEventLoggingExporter.ts
@@ -338664,7 +338615,7 @@ function initialize1PEventLogging() {
338664
338615
  const platform4 = getPlatform();
338665
338616
  const attributes = {
338666
338617
  [import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur",
338667
- [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.84.4"
338618
+ [import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.84.5"
338668
338619
  };
338669
338620
  if (platform4 === "wsl") {
338670
338621
  const wslVersion = getWslVersion();
@@ -338692,7 +338643,7 @@ function initialize1PEventLogging() {
338692
338643
  })
338693
338644
  ]
338694
338645
  });
338695
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.84.4");
338646
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.84.5");
338696
338647
  }
338697
338648
  async function reinitialize1PEventLoggingIfConfigChanged() {
338698
338649
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -341994,9 +341945,9 @@ async function assertMinVersion() {
341994
341945
  if (false) {}
341995
341946
  try {
341996
341947
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
341997
- if (versionConfig.minVersion && lt("1.84.4", versionConfig.minVersion)) {
341948
+ if (versionConfig.minVersion && lt("1.84.5", versionConfig.minVersion)) {
341998
341949
  console.error(`
341999
- It looks like your version of UR (${"1.84.4"}) needs an update.
341950
+ It looks like your version of UR (${"1.84.5"}) needs an update.
342000
341951
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
342001
341952
 
342002
341953
  To update, please run:
@@ -342212,7 +342163,7 @@ async function installGlobalPackage(specificVersion) {
342212
342163
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
342213
342164
  logEvent("tengu_auto_updater_lock_contention", {
342214
342165
  pid: process.pid,
342215
- currentVersion: "1.84.4"
342166
+ currentVersion: "1.84.5"
342216
342167
  });
342217
342168
  return "in_progress";
342218
342169
  }
@@ -342221,7 +342172,7 @@ async function installGlobalPackage(specificVersion) {
342221
342172
  if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
342222
342173
  logError2(new Error("Windows NPM detected in WSL environment"));
342223
342174
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
342224
- currentVersion: "1.84.4"
342175
+ currentVersion: "1.84.5"
342225
342176
  });
342226
342177
  console.error(`
342227
342178
  Error: Windows NPM detected in WSL
@@ -342756,7 +342707,7 @@ function detectLinuxGlobPatternWarnings() {
342756
342707
  }
342757
342708
  async function getDoctorDiagnostic() {
342758
342709
  const installationType = await getCurrentInstallationType();
342759
- const version2 = typeof MACRO !== "undefined" ? "1.84.4" : "unknown";
342710
+ const version2 = typeof MACRO !== "undefined" ? "1.84.5" : "unknown";
342760
342711
  const installationPath = await getInstallationPath();
342761
342712
  const invokedBinary = getInvokedBinary();
342762
342713
  const multipleInstallations = await detectMultipleInstallations();
@@ -343823,7 +343774,7 @@ function getInstallationEnv() {
343823
343774
  return;
343824
343775
  }
343825
343776
  function getURCodeVersion() {
343826
- return "1.84.4";
343777
+ return "1.84.5";
343827
343778
  }
343828
343779
  async function getInstalledVSCodeExtensionVersion(command) {
343829
343780
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -345304,8 +345255,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
345304
345255
  const maxVersion = await getMaxVersion();
345305
345256
  if (maxVersion && gt(version2, maxVersion)) {
345306
345257
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
345307
- if (gte("1.84.4", maxVersion)) {
345308
- logForDebugging(`Native installer: current version ${"1.84.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
345258
+ if (gte("1.84.5", maxVersion)) {
345259
+ logForDebugging(`Native installer: current version ${"1.84.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
345309
345260
  logEvent("tengu_native_update_skipped_max_version", {
345310
345261
  latency_ms: Date.now() - startTime,
345311
345262
  max_version: maxVersion,
@@ -345316,7 +345267,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
345316
345267
  version2 = maxVersion;
345317
345268
  }
345318
345269
  }
345319
- if (!forceReinstall && version2 === "1.84.4" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
345270
+ if (!forceReinstall && version2 === "1.84.5" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
345320
345271
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
345321
345272
  logEvent("tengu_native_update_complete", {
345322
345273
  latency_ms: Date.now() - startTime,
@@ -439180,7 +439131,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
439180
439131
  const client = new Client({
439181
439132
  name: "ur",
439182
439133
  title: "UR",
439183
- version: "1.84.4",
439134
+ version: "1.84.5",
439184
439135
  description: "UR-Nexus autonomous engineering workflow engine",
439185
439136
  websiteUrl: PRODUCT_URL
439186
439137
  }, {
@@ -439537,7 +439488,7 @@ var init_client2 = __esm(() => {
439537
439488
  const client = new Client({
439538
439489
  name: "ur",
439539
439490
  title: "UR",
439540
- version: "1.84.4",
439491
+ version: "1.84.5",
439541
439492
  description: "UR-Nexus autonomous engineering workflow engine",
439542
439493
  websiteUrl: PRODUCT_URL
439543
439494
  }, {
@@ -441334,6 +441285,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
441334
441285
  }
441335
441286
  });
441336
441287
  }
441288
+ messagesForAPI = canonicalizeReusedToolUseIds(messagesForAPI);
441337
441289
  messagesForAPI = ensureToolResultPairing(messagesForAPI);
441338
441290
  if (!betas.includes(ADVISOR_BETA_HEADER)) {
441339
441291
  messagesForAPI = stripAdvisorBlocks(messagesForAPI);
@@ -441516,6 +441468,10 @@ ${deferredToolList}
441516
441468
  type: "enabled"
441517
441469
  };
441518
441470
  }
441471
+ } else if (!hasThinking && effortProvider !== "anthropic-api" && providerSupportsThinkingToggle(effortProvider, options2.model)) {
441472
+ thinking = {
441473
+ type: "disabled"
441474
+ };
441519
441475
  }
441520
441476
  const contextManagement = getAPIContextManagement({
441521
441477
  hasThinking,
@@ -445434,6 +445390,90 @@ function AUTO_REJECT_MESSAGE(toolName) {
445434
445390
  function DONT_ASK_REJECT_MESSAGE(toolName) {
445435
445391
  return `Permission to use ${toolName} has been denied because UR is running in don't ask mode. ${DENIAL_WORKAROUND_GUIDANCE}`;
445436
445392
  }
445393
+ function canonicalizeReusedToolUseIds(messages) {
445394
+ const seenIds = new Set;
445395
+ const assistantRenames = new Map;
445396
+ let renameCount = 0;
445397
+ for (let messageIndex = 0;messageIndex < messages.length; messageIndex++) {
445398
+ const message = messages[messageIndex];
445399
+ if (message.type !== "assistant" || !Array.isArray(message.message.content)) {
445400
+ continue;
445401
+ }
445402
+ const idCounts = new Map;
445403
+ for (const block2 of message.message.content) {
445404
+ if (block2.type !== "tool_use" || typeof block2.id !== "string")
445405
+ continue;
445406
+ idCounts.set(block2.id, (idCounts.get(block2.id) ?? 0) + 1);
445407
+ }
445408
+ const nextMessage = messages[messageIndex + 1];
445409
+ const resultCounts = new Map;
445410
+ if (nextMessage?.type === "user" && Array.isArray(nextMessage.message.content)) {
445411
+ for (const block2 of nextMessage.message.content) {
445412
+ if (typeof block2 === "object" && block2 !== null && "type" in block2 && block2.type === "tool_result" && typeof block2.tool_use_id === "string") {
445413
+ const id = block2.tool_use_id;
445414
+ resultCounts.set(id, (resultCounts.get(id) ?? 0) + 1);
445415
+ }
445416
+ }
445417
+ }
445418
+ const renames = new Map;
445419
+ let blockIndex = 0;
445420
+ for (const block2 of message.message.content) {
445421
+ if (block2.type !== "tool_use" || typeof block2.id !== "string") {
445422
+ blockIndex++;
445423
+ continue;
445424
+ }
445425
+ const originalId = block2.id;
445426
+ const isUnambiguousCompletedCall = idCounts.get(originalId) === 1 && resultCounts.get(originalId) === 1;
445427
+ if (seenIds.has(originalId) && isUnambiguousCompletedCall) {
445428
+ let suffix = 0;
445429
+ let canonicalId = `toolu_ur_${messageIndex}_${blockIndex}`;
445430
+ while (seenIds.has(canonicalId)) {
445431
+ suffix++;
445432
+ canonicalId = `toolu_ur_${messageIndex}_${blockIndex}_${suffix}`;
445433
+ }
445434
+ renames.set(originalId, canonicalId);
445435
+ seenIds.add(canonicalId);
445436
+ renameCount++;
445437
+ } else {
445438
+ seenIds.add(originalId);
445439
+ }
445440
+ blockIndex++;
445441
+ }
445442
+ if (renames.size > 0)
445443
+ assistantRenames.set(messageIndex, renames);
445444
+ }
445445
+ if (assistantRenames.size === 0)
445446
+ return messages;
445447
+ const normalized = messages.map((message, messageIndex) => {
445448
+ const assistantRename = assistantRenames.get(messageIndex);
445449
+ const resultRename = assistantRenames.get(messageIndex - 1);
445450
+ if (!assistantRename && !resultRename || !Array.isArray(message.message.content)) {
445451
+ return message;
445452
+ }
445453
+ let changed = false;
445454
+ const content = message.message.content.map((block2) => {
445455
+ if (assistantRename && block2.type === "tool_use" && typeof block2.id === "string") {
445456
+ const id = assistantRename.get(block2.id);
445457
+ if (id) {
445458
+ changed = true;
445459
+ return { ...block2, id };
445460
+ }
445461
+ }
445462
+ if (resultRename && typeof block2 === "object" && block2 !== null && "type" in block2 && block2.type === "tool_result") {
445463
+ const result = block2;
445464
+ const id = resultRename.get(result.tool_use_id);
445465
+ if (id) {
445466
+ changed = true;
445467
+ return { ...result, tool_use_id: id };
445468
+ }
445469
+ }
445470
+ return block2;
445471
+ });
445472
+ return changed ? { ...message, message: { ...message.message, content } } : message;
445473
+ });
445474
+ logEvent("tengu_reused_tool_use_id_canonicalized", { renameCount });
445475
+ return normalized;
445476
+ }
445437
445477
  function isSyntheticMessage(message) {
445438
445478
  return message.type !== "progress" && message.type !== "attachment" && message.type !== "system" && Array.isArray(message.message.content) && message.message.content[0]?.type === "text" && SYNTHETIC_MESSAGES.has(message.message.content[0].text);
445439
445479
  }
@@ -450409,7 +450449,7 @@ function Feedback({
450409
450449
  platform: env2.platform,
450410
450450
  gitRepo: envInfo.isGit,
450411
450451
  terminal: env2.terminal,
450412
- version: "1.84.4",
450452
+ version: "1.84.5",
450413
450453
  transcript: normalizeMessagesForAPI(messages),
450414
450454
  errors: sanitizedErrors,
450415
450455
  lastApiRequest: getLastAPIRequest(),
@@ -450599,7 +450639,7 @@ function Feedback({
450599
450639
  ", ",
450600
450640
  env2.terminal,
450601
450641
  ", v",
450602
- "1.84.4"
450642
+ "1.84.5"
450603
450643
  ]
450604
450644
  }, undefined, true, undefined, this)
450605
450645
  ]
@@ -450705,7 +450745,7 @@ ${sanitizedDescription}
450705
450745
  ` + `**Environment Info**
450706
450746
  ` + `- Platform: ${env2.platform}
450707
450747
  ` + `- Terminal: ${env2.terminal}
450708
- ` + `- Version: ${"1.84.4"}
450748
+ ` + `- Version: ${"1.84.5"}
450709
450749
  ` + `- Feedback ID: ${feedbackId}
450710
450750
  ` + `
450711
450751
  **Errors**
@@ -453815,7 +453855,7 @@ function buildPrimarySection() {
453815
453855
  }, undefined, false, undefined, this);
453816
453856
  return [{
453817
453857
  label: "Version",
453818
- value: "1.84.4"
453858
+ value: "1.84.5"
453819
453859
  }, {
453820
453860
  label: "Session name",
453821
453861
  value: nameValue
@@ -454780,7 +454820,7 @@ function ModelPicker({
454780
454820
  const focusedEffortLevelLabels = focusedModel ? getSupportedEffortLevelLabelsForModel(focusedModel, currentProvider) : [];
454781
454821
  const focusedSupportsEffort = focusedModel ? modelSupportsEffort(focusedModel, currentProvider) : false;
454782
454822
  const focusedAdvertisesThinking = focusedModel ? modelSupportsThinking(focusedModel, currentProvider) : false;
454783
- const focusedSupportsThinking = focusedModel ? focusedAdvertisesThinking && providerSupportsThinkingToggle(currentProvider) : false;
454823
+ const focusedSupportsThinking = focusedModel ? focusedAdvertisesThinking && providerSupportsThinkingToggle(currentProvider, focusedModel) : false;
454784
454824
  const focusedDefaultEffort = getDefaultEffortLevelForOption(focusedValue, currentProvider);
454785
454825
  const displayEffort = focusedModel ? resolveProviderEffortLevel(focusedModel, effort ?? focusedDefaultEffort, currentProvider) ?? focusedDefaultEffort : focusedDefaultEffort;
454786
454826
  const handleFocus = (value) => {
@@ -457329,7 +457369,7 @@ function Config({
457329
457369
  }
457330
457370
  }, undefined, false, undefined, this)
457331
457371
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime176.jsxDEV(ChannelDowngradeDialog, {
457332
- currentVersion: "1.84.4",
457372
+ currentVersion: "1.84.5",
457333
457373
  onChoice: (choice) => {
457334
457374
  setShowSubmenu(null);
457335
457375
  setTabsHidden(false);
@@ -457341,7 +457381,7 @@ function Config({
457341
457381
  autoUpdatesChannel: "stable"
457342
457382
  };
457343
457383
  if (choice === "stay") {
457344
- newSettings.minimumVersion = "1.84.4";
457384
+ newSettings.minimumVersion = "1.84.5";
457345
457385
  }
457346
457386
  updateSettingsForSource("userSettings", newSettings);
457347
457387
  setSettingsData((prev_27) => ({
@@ -465658,7 +465698,7 @@ function HelpV2(t0) {
465658
465698
  let t6;
465659
465699
  if ($2[31] !== tabs) {
465660
465700
  t6 = /* @__PURE__ */ jsx_dev_runtime203.jsxDEV(Tabs, {
465661
- title: `UR v${"1.84.4"}`,
465701
+ title: `UR v${"1.84.5"}`,
465662
465702
  color: "professionalBlue",
465663
465703
  defaultTab: "general",
465664
465704
  children: tabs
@@ -466592,7 +466632,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
466592
466632
  async function handleInitialize(options2) {
466593
466633
  return {
466594
466634
  name: "UR",
466595
- version: "1.84.4",
466635
+ version: "1.84.5",
466596
466636
  protocolVersion: "0.1.0",
466597
466637
  workspaceRoot: options2.cwd,
466598
466638
  capabilities: {
@@ -483725,7 +483765,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
483725
483765
  return [];
483726
483766
  }
483727
483767
  }
483728
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.84.4") {
483768
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.84.5") {
483729
483769
  if (process.env.USER_TYPE === "ant") {
483730
483770
  const changelog = "";
483731
483771
  if (changelog) {
@@ -483752,7 +483792,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.84.4")
483752
483792
  releaseNotes
483753
483793
  };
483754
483794
  }
483755
- function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.84.4") {
483795
+ function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.84.5") {
483756
483796
  if (process.env.USER_TYPE === "ant") {
483757
483797
  const changelog = "";
483758
483798
  if (changelog) {
@@ -486660,7 +486700,7 @@ function getRecentActivitySync() {
486660
486700
  return cachedActivity;
486661
486701
  }
486662
486702
  function getLogoDisplayData() {
486663
- const version2 = process.env.DEMO_VERSION ?? "1.84.4";
486703
+ const version2 = process.env.DEMO_VERSION ?? "1.84.5";
486664
486704
  const serverUrl = getDirectConnectServerUrl();
486665
486705
  const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
486666
486706
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -487548,7 +487588,7 @@ function LogoV2() {
487548
487588
  if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
487549
487589
  t2 = () => {
487550
487590
  const currentConfig = getGlobalConfig();
487551
- if (currentConfig.lastReleaseNotesSeen === "1.84.4") {
487591
+ if (currentConfig.lastReleaseNotesSeen === "1.84.5") {
487552
487592
  return;
487553
487593
  }
487554
487594
  saveGlobalConfig(_temp327);
@@ -488236,12 +488276,12 @@ function LogoV2() {
488236
488276
  return t41;
488237
488277
  }
488238
488278
  function _temp327(current) {
488239
- if (current.lastReleaseNotesSeen === "1.84.4") {
488279
+ if (current.lastReleaseNotesSeen === "1.84.5") {
488240
488280
  return current;
488241
488281
  }
488242
488282
  return {
488243
488283
  ...current,
488244
- lastReleaseNotesSeen: "1.84.4"
488284
+ lastReleaseNotesSeen: "1.84.5"
488245
488285
  };
488246
488286
  }
488247
488287
  function _temp240(s_0) {
@@ -504334,7 +504374,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
504334
504374
  if (spec.name !== specName) {
504335
504375
  throw new Error("Agentic CI workflow spec name does not match");
504336
504376
  }
504337
- const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.84.4" : "1.84.4");
504377
+ const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5");
504338
504378
  if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
504339
504379
  throw new Error("invalid ur-agent package version");
504340
504380
  }
@@ -505330,7 +505370,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
505330
505370
  path: ".github/workflows/ur.yml",
505331
505371
  root: "project",
505332
505372
  content: compileAgenticCiWorkflow("default", {
505333
- packageVersion: typeof MACRO !== "undefined" ? "1.84.4" : "1.84.4"
505373
+ packageVersion: typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5"
505334
505374
  })
505335
505375
  },
505336
505376
  {
@@ -505393,7 +505433,7 @@ function value(tokens, flag) {
505393
505433
  return index2 >= 0 ? tokens[index2 + 1] : undefined;
505394
505434
  }
505395
505435
  function cliVersion() {
505396
- return typeof MACRO !== "undefined" ? "1.84.4" : "1.84.4";
505436
+ return typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5";
505397
505437
  }
505398
505438
  function workflowPath(cwd2) {
505399
505439
  return join156(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
@@ -506302,7 +506342,7 @@ function formatA2AV1AgentCard(options2 = {}, pretty = true) {
506302
506342
  var urVersion, researchSnapshotDate = "2026-08-10", coverage2, priorityRoadmap;
506303
506343
  var init_trends = __esm(() => {
506304
506344
  init_a2aCardSignature();
506305
- urVersion = typeof MACRO !== "undefined" ? "1.84.4" : "1.84.4";
506345
+ urVersion = typeof MACRO !== "undefined" ? "1.84.5" : "1.84.5";
506306
506346
  coverage2 = [
506307
506347
  {
506308
506348
  id: "local-runtime",
@@ -512035,7 +512075,7 @@ function createAcpStdioApp(deps) {
512035
512075
  }
512036
512076
  },
512037
512077
  authMethods: [],
512038
- agentInfo: { name: "UR-Nexus", version: "1.84.4" }
512078
+ agentInfo: { name: "UR-Nexus", version: "1.84.5" }
512039
512079
  })).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
512040
512080
  const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
512041
512081
  await runtime2.announce({
@@ -512132,7 +512172,7 @@ function createAcpStdioAgent(deps) {
512132
512172
  }
512133
512173
  },
512134
512174
  authMethods: [],
512135
- agentInfo: { name: "UR-Nexus", version: "1.84.4" }
512175
+ agentInfo: { name: "UR-Nexus", version: "1.84.5" }
512136
512176
  });
512137
512177
  return;
512138
512178
  case "authenticate":
@@ -726135,7 +726175,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
726135
726175
  smapsRollup,
726136
726176
  platform: process.platform,
726137
726177
  nodeVersion: process.version,
726138
- ccVersion: "1.84.4"
726178
+ ccVersion: "1.84.5"
726139
726179
  };
726140
726180
  }
726141
726181
  async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
@@ -726724,7 +726764,7 @@ var init_bridge_kick = __esm(() => {
726724
726764
  var call153 = async () => {
726725
726765
  return {
726726
726766
  type: "text",
726727
- value: "1.84.4"
726767
+ value: "1.84.5"
726728
726768
  };
726729
726769
  }, version2, version_default;
726730
726770
  var init_version = __esm(() => {
@@ -729926,7 +729966,7 @@ function ProviderFirstModelPicker({
729926
729966
  const focusedEffortLevelLabels = focusedResolvedModel && focusedProviderId ? getSupportedEffortLevelLabelsForModel(focusedResolvedModel, focusedProviderId) : [];
729927
729967
  const focusedSupportsEffort = focusedResolvedModel ? modelSupportsEffort(focusedResolvedModel, focusedProviderId) : false;
729928
729968
  const focusedAdvertisesThinking = focusedResolvedModel && focusedProviderId ? modelSupportsThinking(focusedResolvedModel, focusedProviderId) : false;
729929
- const focusedSupportsThinking = focusedResolvedModel && focusedProviderId ? focusedAdvertisesThinking && providerSupportsThinkingToggle(focusedProviderId) : false;
729969
+ const focusedSupportsThinking = focusedResolvedModel && focusedProviderId ? focusedAdvertisesThinking && providerSupportsThinkingToggle(focusedProviderId, focusedResolvedModel) : false;
729930
729970
  const focusedDefaultEffort = focusedResolvedModel ? convertEffortValueToLevel(getDefaultEffortForModel(focusedResolvedModel, focusedProviderId) ?? (focusedEffortLevels.includes("high") ? "high" : focusedEffortLevels.at(-1)) ?? "high") : "high";
729931
729971
  const displayedEffort = focusedResolvedModel ? resolveProviderEffortLevel(focusedResolvedModel, effort ?? focusedDefaultEffort, focusedProviderId) ?? focusedDefaultEffort : focusedDefaultEffort;
729932
729972
  function handleProviderFocus(value2) {
@@ -732832,7 +732872,7 @@ function applyEffortCommandState(previous, result) {
732832
732872
  }
732833
732873
  function setEffortValue(effortValue, model, provider = getRuntimeProvider()) {
732834
732874
  if (model && !modelSupportsEffort(model, provider)) {
732835
- if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider)) {
732875
+ if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model)) {
732836
732876
  const result = updateSettingsForSource("userSettings", {
732837
732877
  alwaysThinkingEnabled: undefined
732838
732878
  });
@@ -732920,7 +732960,7 @@ function showCurrentEffort(appStateEffort, model, provider = getRuntimeProvider(
732920
732960
  const effectiveValue = envOverride === null ? undefined : envOverride ?? appStateEffort;
732921
732961
  if (effectiveValue === undefined) {
732922
732962
  if (!modelSupportsEffort(model, provider)) {
732923
- if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider)) {
732963
+ if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model)) {
732924
732964
  return {
732925
732965
  message: `Effort: no model-specific graded ladder advertised for ${model} on ${provider}. UR is using the provider-native on/off control; thinking is ${thinkingEnabled === false ? "OFF" : "ON"}. Use /thinking on|off to change it.`
732926
732966
  };
@@ -732946,7 +732986,7 @@ function showCurrentEffort(appStateEffort, model, provider = getRuntimeProvider(
732946
732986
  };
732947
732987
  }
732948
732988
  if (!modelSupportsEffort(model, provider)) {
732949
- if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider)) {
732989
+ if (modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model)) {
732950
732990
  return {
732951
732991
  message: `Requested effort: ${effectiveValue}; not sent \u2014 ${model} on ${provider} advertises thinking but no model-specific graded ladder. UR is using the provider-native on/off control; thinking is ${thinkingEnabled === false ? "OFF" : "ON"}. Use /thinking on|off to change it.`
732952
732992
  };
@@ -733134,7 +733174,7 @@ function capabilityMessage(enabled, model, provider) {
733134
733174
  if (!modelSupportsThinking(model, provider)) {
733135
733175
  return `${model} on ${provider} does not advertise thinking, so UR will not send a thinking control to it.`;
733136
733176
  }
733137
- if (!providerSupportsThinkingToggle(provider)) {
733177
+ if (!providerSupportsThinkingToggle(provider, model)) {
733138
733178
  return `${model} advertises thinking, but the ${provider} runtime has no provider-native on/off mapping. ${modelSupportsEffort(model, provider) ? "Use /effort for its advertised graded control." : "UR will not invent a boolean wire field."}`;
733139
733179
  }
733140
733180
  if (!modelSupportsEffort(model, provider)) {
@@ -733152,7 +733192,7 @@ function executeThinking(args, currentEnabled, model, provider = getRuntimeProvi
733152
733192
  const normalized = args.trim().toLowerCase();
733153
733193
  if (!normalized || normalized === "status" || normalized === "current") {
733154
733194
  const disabledByEnvironment2 = isEnvTruthy(process.env.UR_CODE_DISABLE_THINKING);
733155
- const statusLabel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider) ? "Thinking" : "Thinking preference";
733195
+ const statusLabel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model) ? "Thinking" : "Thinking preference";
733156
733196
  return {
733157
733197
  message: disabledByEnvironment2 && currentEnabled ? `Thinking preference: ON, but UR_CODE_DISABLE_THINKING disables it for this session. ${capabilityMessage(false, model, provider)}` : `${statusLabel}: ${currentEnabled ? "ON" : "OFF"}. ${capabilityMessage(currentEnabled, model, provider)}`
733158
733198
  };
@@ -733178,7 +733218,7 @@ function executeThinking(args, currentEnabled, model, provider = getRuntimeProvi
733178
733218
  source: "slash-command"
733179
733219
  });
733180
733220
  const disabledByEnvironment = enabled && isEnvTruthy(process.env.UR_CODE_DISABLE_THINKING);
733181
- const appliesToActiveModel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider) && !disabledByEnvironment;
733221
+ const appliesToActiveModel = modelSupportsThinking(model, provider) && providerSupportsThinkingToggle(provider, model) && !disabledByEnvironment;
733182
733222
  return {
733183
733223
  message: disabledByEnvironment ? `Thinking preference saved as ON, but UR_CODE_DISABLE_THINKING disables it for this session. ${capabilityMessage(false, model, provider)}` : `${appliesToActiveModel ? "Thinking" : "Thinking preference"} ${enabled ? "ON" : "OFF"} for this session; user preference saved. ${capabilityMessage(enabled, model, provider)}`,
733184
733224
  thinkingUpdate: { value: enabled }
@@ -738618,7 +738658,7 @@ function generateHtmlReport(data, insights) {
738618
738658
  </html>`;
738619
738659
  }
738620
738660
  function buildExportData(data, insights, facets, remoteStats) {
738621
- const version3 = typeof MACRO !== "undefined" ? "1.84.4" : "unknown";
738661
+ const version3 = typeof MACRO !== "undefined" ? "1.84.5" : "unknown";
738622
738662
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
738623
738663
  const facets_summary = {
738624
738664
  total: facets.size,
@@ -742933,7 +742973,7 @@ var init_sessionStorage = __esm(() => {
742933
742973
  init_settings2();
742934
742974
  init_slowOperations();
742935
742975
  init_uuid();
742936
- VERSION7 = typeof MACRO !== "undefined" ? "1.84.4" : "unknown";
742976
+ VERSION7 = typeof MACRO !== "undefined" ? "1.84.5" : "unknown";
742937
742977
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
742938
742978
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
742939
742979
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -744148,7 +744188,7 @@ var init_filesystem = __esm(() => {
744148
744188
  });
744149
744189
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
744150
744190
  const nonce = randomBytes23(16).toString("hex");
744151
- return join234(getURTempDir(), "bundled-skills", "1.84.4", nonce);
744191
+ return join234(getURTempDir(), "bundled-skills", "1.84.5", nonce);
744152
744192
  });
744153
744193
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
744154
744194
  });
@@ -763943,19 +763983,21 @@ var exports_standardAPI = {};
763943
763983
  __export(exports_standardAPI, {
763944
763984
  parseProviderTokenCount: () => parseProviderTokenCount,
763945
763985
  createStandardAPIClient: () => createStandardAPIClient,
763946
- buildTokenCountRequest: () => buildTokenCountRequest
763986
+ buildTokenCountRequest: () => buildTokenCountRequest,
763987
+ buildAPIRequest: () => buildAPIRequest
763947
763988
  });
763948
763989
  import { randomUUID as randomUUID69 } from "crypto";
763949
763990
  async function createStandardAPIClient(options5) {
763950
763991
  const { providerId, apiKey, baseUrl, maxRetries } = options5;
763951
763992
  const family = getProviderFamily(providerId);
763952
763993
  async function doRequest(params, requestOptions) {
763953
- const endpoint = getAPIEndpoint(family, baseUrl, params.model, false);
763954
- const clientRequestId = params?.headers?.["x-client-request-id"];
763955
- const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, params, providerId), {
763994
+ const wireParams = withConfiguredAnthropicPerformance(family, params, options5.anthropic);
763995
+ const endpoint = getAPIEndpoint(family, baseUrl, wireParams.model, false);
763996
+ const clientRequestId = wireParams?.headers?.["x-client-request-id"];
763997
+ const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, wireParams, providerId), {
763956
763998
  headers: {
763957
763999
  "Content-Type": "application/json",
763958
- ...buildAuthHeaders(family, apiKey, params),
764000
+ ...buildAuthHeaders(family, apiKey, wireParams),
763959
764001
  ...clientRequestId && { "x-client-request-id": clientRequestId },
763960
764002
  ...requestOptions?.headers ?? {}
763961
764003
  }
@@ -763964,17 +764006,21 @@ async function createStandardAPIClient(options5) {
763964
764006
  timeoutMs: requestOptions?.timeoutMs,
763965
764007
  signal: requestOptions?.signal
763966
764008
  });
763967
- return { response, data: parseAPIResponse(family, response.data, params.model) };
764009
+ return {
764010
+ response,
764011
+ data: parseAPIResponse(family, response.data, wireParams.model)
764012
+ };
763968
764013
  }
763969
764014
  async function doStream(params, requestOptions, controller) {
763970
- const endpoint = getAPIEndpoint(family, baseUrl, params.model, true);
764015
+ const wireParams = withConfiguredAnthropicPerformance(family, params, options5.anthropic);
764016
+ const endpoint = getAPIEndpoint(family, baseUrl, wireParams.model, true);
763971
764017
  const streamController = controller ?? new AbortController;
763972
764018
  const signal = mergeAbortSignals([requestOptions?.signal, streamController.signal]);
763973
- const clientRequestId = params?.headers?.["x-client-request-id"];
763974
- const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, { ...params, stream: true }, providerId), {
764019
+ const clientRequestId = wireParams?.headers?.["x-client-request-id"];
764020
+ const response = await axiosPostWithProviderReliability(endpoint, buildAPIRequest(family, { ...wireParams, stream: true }, providerId), {
763975
764021
  headers: {
763976
764022
  "Content-Type": "application/json",
763977
- ...buildAuthHeaders(family, apiKey, params),
764023
+ ...buildAuthHeaders(family, apiKey, wireParams),
763978
764024
  ...clientRequestId && { "x-client-request-id": clientRequestId },
763979
764025
  ...requestOptions?.headers ?? {}
763980
764026
  },
@@ -763989,7 +764035,7 @@ async function createStandardAPIClient(options5) {
763989
764035
  const streamOptions = {
763990
764036
  controller: streamController,
763991
764037
  signal,
763992
- model: params.model,
764038
+ model: wireParams.model,
763993
764039
  requestId,
763994
764040
  providerName: family
763995
764041
  };
@@ -764058,6 +764104,20 @@ async function createStandardAPIClient(options5) {
764058
764104
  };
764059
764105
  return { beta: { messages: messagesAPI } };
764060
764106
  }
764107
+ function isAnthropicFastModeModel(model) {
764108
+ return /^claude-opus-(?:5(?:-|$)|4[-.]8(?:-|$))/iu.test(String(model ?? ""));
764109
+ }
764110
+ function withConfiguredAnthropicPerformance(family, params, settings) {
764111
+ if (family !== "anthropic" || settings?.speed !== "fast" || !isAnthropicFastModeModel(params?.model)) {
764112
+ return params;
764113
+ }
764114
+ const betas = Array.isArray(params.betas) ? params.betas : [];
764115
+ return {
764116
+ ...params,
764117
+ speed: "fast",
764118
+ betas: betas.includes(ANTHROPIC_FAST_MODE_BETA) ? betas : [...betas, ANTHROPIC_FAST_MODE_BETA]
764119
+ };
764120
+ }
764061
764121
  function buildTokenCountRequest(family, baseUrl, params, providerId) {
764062
764122
  switch (family) {
764063
764123
  case "openai": {
@@ -764161,7 +764221,7 @@ function buildAPIRequest(family, params, providerId) {
764161
764221
  return toOpenAICompatibleRequest(params, "openai");
764162
764222
  }
764163
764223
  case "anthropic": {
764164
- const tools = toAnthropicTools(params.tools);
764224
+ const tools = toAnthropicTools(params.tools, Boolean(params.stream));
764165
764225
  return {
764166
764226
  model: params.model,
764167
764227
  ...params.system && { system: toAnthropicSystem(params.system) },
@@ -764175,6 +764235,7 @@ function buildAPIRequest(family, params, providerId) {
764175
764235
  ...params.output_config !== undefined && {
764176
764236
  output_config: providerOutputConfig(params, providerId)
764177
764237
  },
764238
+ ...params.speed === "fast" && { speed: "fast" },
764178
764239
  stream: Boolean(params.stream),
764179
764240
  ...tools.length > 0 ? { tools } : {},
764180
764241
  ...params.tool_choice !== undefined ? { tool_choice: params.tool_choice } : {}
@@ -764264,7 +764325,8 @@ function parseAPIResponse(family, data, fallbackModel) {
764264
764325
  input_tokens: data.usage?.input_tokens ?? 0,
764265
764326
  output_tokens: data.usage?.output_tokens ?? 0,
764266
764327
  cache_creation_input_tokens: data.usage?.cache_creation_input_tokens ?? 0,
764267
- cache_read_input_tokens: data.usage?.cache_read_input_tokens ?? 0
764328
+ cache_read_input_tokens: data.usage?.cache_read_input_tokens ?? 0,
764329
+ speed: data.usage?.speed ?? null
764268
764330
  }
764269
764331
  };
764270
764332
  }
@@ -764327,7 +764389,20 @@ function geminiSystemInstruction(params) {
764327
764389
  }
764328
764390
  function toAnthropicSystem(system) {
764329
764391
  assertNoImageBlocks(system, "anthropic", "system content");
764330
- return system;
764392
+ if (!Array.isArray(system))
764393
+ return system;
764394
+ return system.map((block2, index2) => toAnthropicContentBlock(block2, `system[${index2}]`));
764395
+ }
764396
+ function toAnthropicCacheControl(value2) {
764397
+ if (!value2 || typeof value2 !== "object" || Array.isArray(value2))
764398
+ return;
764399
+ const cache5 = value2;
764400
+ if (cache5.type !== "ephemeral")
764401
+ return;
764402
+ return {
764403
+ type: "ephemeral",
764404
+ ...cache5.ttl === "1h" ? { ttl: "1h" } : {}
764405
+ };
764331
764406
  }
764332
764407
  function toAnthropicMessages(messages) {
764333
764408
  if (!Array.isArray(messages))
@@ -764347,8 +764422,13 @@ function toAnthropicContent(content, context6) {
764347
764422
  function toAnthropicContentBlock(block2, context6) {
764348
764423
  if (typeof block2 === "string")
764349
764424
  return { type: "text", text: block2 };
764425
+ const cacheControl = toAnthropicCacheControl(block2?.cache_control);
764350
764426
  if (block2?.type === "text") {
764351
- return { type: "text", text: block2.text ?? "" };
764427
+ return {
764428
+ type: "text",
764429
+ text: block2.text ?? "",
764430
+ ...cacheControl && { cache_control: cacheControl }
764431
+ };
764352
764432
  }
764353
764433
  if (block2?.type === "image") {
764354
764434
  const source = normalizeImageBlockSource(block2, "anthropic", context6);
@@ -764359,7 +764439,8 @@ function toAnthropicContentBlock(block2, context6) {
764359
764439
  type: "base64",
764360
764440
  media_type: source.mediaType,
764361
764441
  data: source.data
764362
- }
764442
+ },
764443
+ ...cacheControl && { cache_control: cacheControl }
764363
764444
  };
764364
764445
  }
764365
764446
  return {
@@ -764367,15 +764448,24 @@ function toAnthropicContentBlock(block2, context6) {
764367
764448
  source: {
764368
764449
  type: "url",
764369
764450
  url: source.url
764370
- }
764451
+ },
764452
+ ...cacheControl && { cache_control: cacheControl }
764371
764453
  };
764372
764454
  }
764373
764455
  if (block2?.type === "tool_result") {
764456
+ const { cache_control: _cacheControl, ...rest } = block2;
764374
764457
  return {
764375
- ...block2,
764376
- content: toAnthropicToolResultContent(block2.content, `${context6}.content`)
764458
+ ...rest,
764459
+ content: toAnthropicToolResultContent(block2.content, `${context6}.content`),
764460
+ ...cacheControl && { cache_control: cacheControl }
764377
764461
  };
764378
764462
  }
764463
+ if (cacheControl)
764464
+ return { ...block2, cache_control: cacheControl };
764465
+ if (block2?.cache_control !== undefined) {
764466
+ const { cache_control: _cacheControl, ...rest } = block2;
764467
+ return rest;
764468
+ }
764379
764469
  return block2;
764380
764470
  }
764381
764471
  function toAnthropicToolResultContent(content, context6) {
@@ -764396,7 +764486,7 @@ function toAnthropicToolResultBlock(block2, context6) {
764396
764486
  }
764397
764487
  return block2;
764398
764488
  }
764399
- function toAnthropicTools(tools) {
764489
+ function toAnthropicTools(tools, eagerInputStreaming = false) {
764400
764490
  if (tools === undefined || tools === null)
764401
764491
  return [];
764402
764492
  if (!Array.isArray(tools)) {
@@ -764407,11 +764497,14 @@ function toAnthropicTools(tools) {
764407
764497
  throw new ToolSchemaValidationError("Anthropic tool entry is missing required name/input_schema fields.");
764408
764498
  }
764409
764499
  assertValidToolName(tool.name, "Anthropic");
764500
+ const cacheControl = toAnthropicCacheControl(tool.cache_control);
764410
764501
  return {
764411
764502
  name: tool.name,
764412
764503
  ...tool.description !== undefined && { description: tool.description },
764413
764504
  input_schema: prepareAndValidateToolSchema(tool.input_schema, tool.name),
764414
- ...tool.strict === true && { strict: true }
764505
+ ...tool.strict === true && { strict: true },
764506
+ ...eagerInputStreaming && { eager_input_streaming: true },
764507
+ ...cacheControl && { cache_control: cacheControl }
764415
764508
  };
764416
764509
  });
764417
764510
  assertUniqueToolNames(mapped.map((tool) => tool.name), "Anthropic");
@@ -764678,7 +764771,7 @@ function collectToolNamesById2(messages) {
764678
764771
  function estimateTokenCount2(params) {
764679
764772
  return estimateProviderInputTokens(params);
764680
764773
  }
764681
- var ANTHROPIC_VERSION = "2023-06-01", TOKEN_COUNT_TIMEOUT_MS3 = 1e4;
764774
+ var ANTHROPIC_VERSION = "2023-06-01", ANTHROPIC_FAST_MODE_BETA = "fast-mode-2026-02-01", TOKEN_COUNT_TIMEOUT_MS3 = 1e4;
764682
764775
  var init_standardAPI = __esm(() => {
764683
764776
  init_debug();
764684
764777
  init_effort();
@@ -764993,7 +765086,8 @@ async function createAPIClient(providerId, options5 = {}) {
764993
765086
  baseUrl: resolveProviderBaseUrl(providerId, settings),
764994
765087
  maxRetries: options5.maxRetries ?? 3,
764995
765088
  model: options5.model,
764996
- fetch: options5.fetchOverride
765089
+ fetch: options5.fetchOverride,
765090
+ anthropic: providerSettings.anthropic
764997
765091
  });
764998
765092
  }
764999
765093
  var ProviderResponseParseError, ProviderCapabilityError;
@@ -775944,7 +776038,7 @@ function getUserAgent() {
775944
776038
  const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
775945
776039
  const workload = getWorkload();
775946
776040
  const workloadSuffix = workload ? `, workload/${workload}` : "";
775947
- return `ur-cli/${"1.84.4"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
776041
+ return `ur-cli/${"1.84.5"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
775948
776042
  }
775949
776043
  function getMCPUserAgent() {
775950
776044
  const parts = [];
@@ -775958,7 +776052,7 @@ function getMCPUserAgent() {
775958
776052
  parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
775959
776053
  }
775960
776054
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
775961
- return `ur/${"1.84.4"}${suffix}`;
776055
+ return `ur/${"1.84.5"}${suffix}`;
775962
776056
  }
775963
776057
  function getWebFetchUserAgent() {
775964
776058
  return `UR-User (${getURCodeUserAgent()})`;
@@ -793121,7 +793215,7 @@ function buildSystemInitMessage(inputs) {
793121
793215
  slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
793122
793216
  apiKeySource: getURHQApiKeyWithSource().source,
793123
793217
  betas: getSdkBetas(),
793124
- ur_version: "1.84.4",
793218
+ ur_version: "1.84.5",
793125
793219
  output_style: outputStyle,
793126
793220
  agents: inputs.agents.map((agent2) => agent2.agentType),
793127
793221
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
@@ -796662,7 +796756,7 @@ var init_useVoiceEnabled = __esm(() => {
796662
796756
  function getSemverPart(version3) {
796663
796757
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
796664
796758
  }
796665
- function useUpdateNotification(updatedVersion, initialVersion = "1.84.4") {
796759
+ function useUpdateNotification(updatedVersion, initialVersion = "1.84.5") {
796666
796760
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
796667
796761
  if (!updatedVersion) {
796668
796762
  return null;
@@ -796711,7 +796805,7 @@ function AutoUpdater({
796711
796805
  return;
796712
796806
  }
796713
796807
  if (false) {}
796714
- const currentVersion = "1.84.4";
796808
+ const currentVersion = "1.84.5";
796715
796809
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
796716
796810
  let latestVersion = await getLatestVersion(channel);
796717
796811
  const isDisabled = isAutoUpdaterDisabled();
@@ -796940,12 +797034,12 @@ function NativeAutoUpdater({
796940
797034
  logEvent("tengu_native_auto_updater_start", {});
796941
797035
  try {
796942
797036
  const maxVersion = await getMaxVersion();
796943
- if (maxVersion && gt("1.84.4", maxVersion)) {
797037
+ if (maxVersion && gt("1.84.5", maxVersion)) {
796944
797038
  const msg = await getMaxVersionMessage();
796945
797039
  setMaxVersionIssue(msg ?? "affects your version");
796946
797040
  }
796947
797041
  const result = await installLatest(channel);
796948
- const currentVersion = "1.84.4";
797042
+ const currentVersion = "1.84.5";
796949
797043
  const latencyMs = Date.now() - startTime;
796950
797044
  if (result.lockFailed) {
796951
797045
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -797082,17 +797176,17 @@ function PackageManagerAutoUpdater(t0) {
797082
797176
  const maxVersion = await getMaxVersion();
797083
797177
  if (maxVersion && latest && gt(latest, maxVersion)) {
797084
797178
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
797085
- if (gte("1.84.4", maxVersion)) {
797086
- logForDebugging(`PackageManagerAutoUpdater: current version ${"1.84.4"} is already at or above maxVersion ${maxVersion}, skipping update`);
797179
+ if (gte("1.84.5", maxVersion)) {
797180
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"1.84.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
797087
797181
  setUpdateAvailable(false);
797088
797182
  return;
797089
797183
  }
797090
797184
  latest = maxVersion;
797091
797185
  }
797092
- const hasUpdate = latest && !gte("1.84.4", latest) && !shouldSkipVersion(latest);
797186
+ const hasUpdate = latest && !gte("1.84.5", latest) && !shouldSkipVersion(latest);
797093
797187
  setUpdateAvailable(!!hasUpdate);
797094
797188
  if (hasUpdate) {
797095
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.84.4"} -> ${latest}`);
797189
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.84.5"} -> ${latest}`);
797096
797190
  }
797097
797191
  };
797098
797192
  $2[0] = t1;
@@ -797126,7 +797220,7 @@ function PackageManagerAutoUpdater(t0) {
797126
797220
  wrap: "truncate",
797127
797221
  children: [
797128
797222
  "currentVersion: ",
797129
- "1.84.4"
797223
+ "1.84.5"
797130
797224
  ]
797131
797225
  }, undefined, true, undefined, this);
797132
797226
  $2[3] = verbose;
@@ -807975,7 +808069,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
807975
808069
  project_dir: getOriginalCwd(),
807976
808070
  added_dirs: addedDirs
807977
808071
  },
807978
- version: "1.84.4",
808072
+ version: "1.84.5",
807979
808073
  output_style: {
807980
808074
  name: outputStyleName
807981
808075
  },
@@ -808110,7 +808204,7 @@ function StatusLineInner({
808110
808204
  const attention = customStatusError ?? taskAttention;
808111
808205
  const terminalSize = React138.useContext(TerminalSizeContext);
808112
808206
  const defaultStatusLineText = buildDefaultStatusBar({
808113
- version: "1.84.4",
808207
+ version: "1.84.5",
808114
808208
  providerLabel: providerRuntime.providerLabel,
808115
808209
  authMode: providerRuntime.authLabel,
808116
808210
  model: renderModelName(mainLoopModel) || providerRuntime.model || "",
@@ -820501,7 +820595,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
820501
820595
  } catch {}
820502
820596
  const data = {
820503
820597
  trigger: trigger2,
820504
- version: "1.84.4",
820598
+ version: "1.84.5",
820505
820599
  platform: process.platform,
820506
820600
  transcript,
820507
820601
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -832883,7 +832977,7 @@ function WelcomeV2() {
832883
832977
  dimColor: true,
832884
832978
  children: [
832885
832979
  "v",
832886
- "1.84.4"
832980
+ "1.84.5"
832887
832981
  ]
832888
832982
  }, undefined, true, undefined, this)
832889
832983
  ]
@@ -834129,7 +834223,7 @@ function completeOnboarding() {
834129
834223
  saveGlobalConfig((current) => ({
834130
834224
  ...current,
834131
834225
  hasCompletedOnboarding: true,
834132
- lastOnboardingVersion: "1.84.4"
834226
+ lastOnboardingVersion: "1.84.5"
834133
834227
  }));
834134
834228
  }
834135
834229
  function showDialog(root2, renderer) {
@@ -839126,7 +839220,7 @@ function appendToLog(path28, message) {
839126
839220
  cwd: getFsImplementation().cwd(),
839127
839221
  userType: process.env.USER_TYPE,
839128
839222
  sessionId: getSessionId(),
839129
- version: "1.84.4"
839223
+ version: "1.84.5"
839130
839224
  };
839131
839225
  getLogWriter(path28).write(messageWithTimestamp);
839132
839226
  }
@@ -843289,8 +843383,8 @@ async function getEnvLessBridgeConfig() {
843289
843383
  }
843290
843384
  async function checkEnvLessBridgeMinVersion() {
843291
843385
  const cfg = await getEnvLessBridgeConfig();
843292
- if (cfg.min_version && lt("1.84.4", cfg.min_version)) {
843293
- return `Your version of UR (${"1.84.4"}) is too old for Remote Control.
843386
+ if (cfg.min_version && lt("1.84.5", cfg.min_version)) {
843387
+ return `Your version of UR (${"1.84.5"}) is too old for Remote Control.
843294
843388
  Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
843295
843389
  }
843296
843390
  return null;
@@ -843764,7 +843858,7 @@ async function initBridgeCore(params) {
843764
843858
  const rawApi = createBridgeApiClient({
843765
843859
  baseUrl,
843766
843860
  getAccessToken,
843767
- runnerVersion: "1.84.4",
843861
+ runnerVersion: "1.84.5",
843768
843862
  onDebug: logForDebugging,
843769
843863
  onAuth401,
843770
843864
  getTrustedDeviceToken
@@ -857206,7 +857300,7 @@ function getAgUiCapabilities() {
857206
857300
  name: "UR-Nexus",
857207
857301
  type: "ur-nexus",
857208
857302
  description: "Provider-flexible, local-first autonomous engineering workflow agent.",
857209
- version: "1.84.4",
857303
+ version: "1.84.5",
857210
857304
  provider: "UR",
857211
857305
  documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
857212
857306
  },
@@ -858026,7 +858120,7 @@ function createMCPServer(cwd4, debug2, verbose) {
858026
858120
  };
858027
858121
  const server2 = new Server({
858028
858122
  name: "ur-nexus",
858029
- version: "1.84.4"
858123
+ version: "1.84.5"
858030
858124
  }, {
858031
858125
  capabilities: {
858032
858126
  tools: {}
@@ -859229,7 +859323,7 @@ function thrownResponse(error61) {
859229
859323
  }
859230
859324
  async function createUrMcp2026Runtime(options5) {
859231
859325
  const server2 = createMCPServer(options5.cwd, options5.debug === true, options5.verbose === true);
859232
- const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.84.4" }, { capabilities: {} });
859326
+ const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.84.5" }, { capabilities: {} });
859233
859327
  const [clientTransport, serverTransport] = createLinkedTransportPair();
859234
859328
  try {
859235
859329
  await server2.connect(serverTransport);
@@ -859240,7 +859334,7 @@ async function createUrMcp2026Runtime(options5) {
859240
859334
  }
859241
859335
  const runtime2 = new Mcp2026Runtime({
859242
859336
  cwd: options5.cwd,
859243
- version: "1.84.4",
859337
+ version: "1.84.5",
859244
859338
  backend: {
859245
859339
  listTools: async () => {
859246
859340
  const listed = await client2.listTools();
@@ -860170,6 +860264,7 @@ var init_providers2 = __esm(() => {
860170
860264
  "openrouter.preferred_max_latency",
860171
860265
  "openrouter.service_tier",
860172
860266
  "openrouter.speed",
860267
+ "anthropic.speed",
860173
860268
  "model",
860174
860269
  "base_url"
860175
860270
  ];
@@ -860265,6 +860360,11 @@ function providerConfigEntries() {
860265
860360
  value: configured.openrouter?.speed ?? "standard",
860266
860361
  category: "provider"
860267
860362
  },
860363
+ {
860364
+ key: "anthropic.speed",
860365
+ value: configured.anthropic?.speed ?? "standard",
860366
+ category: "provider"
860367
+ },
860268
860368
  { key: "model", value: active3.model ?? null, category: "provider" },
860269
860369
  { key: "base_url", value: active3.baseUrl ?? null, category: "provider" }
860270
860370
  ];
@@ -862118,7 +862218,7 @@ async function update() {
862118
862218
  logEvent("tengu_update_check", {});
862119
862219
  const diagnostic2 = await getDoctorDiagnostic();
862120
862220
  const result = await checkUpgradeStatus({
862121
- currentVersion: "1.84.4",
862221
+ currentVersion: "1.84.5",
862122
862222
  packageName: UR_AGENT_PACKAGE_NAME,
862123
862223
  installationType: diagnostic2.installationType,
862124
862224
  latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
@@ -863446,7 +863546,7 @@ ${customInstructions}` : customInstructions;
863446
863546
  }
863447
863547
  }
863448
863548
  logForDiagnosticsNoPII("info", "started", {
863449
- version: "1.84.4",
863549
+ version: "1.84.5",
863450
863550
  is_native_binary: isInBundledMode()
863451
863551
  });
863452
863552
  registerCleanup(async () => {
@@ -864233,7 +864333,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
864233
864333
  pendingHookMessages
864234
864334
  }, renderAndRun);
864235
864335
  }
864236
- }).version("1.84.4 (UR-Nexus)", "-v, --version", "Output the version number");
864336
+ }).version("1.84.5 (UR-Nexus)", "-v, --version", "Output the version number");
864237
864337
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
864238
864338
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
864239
864339
  if (canUserConfigureAdvisor()) {
@@ -865360,7 +865460,7 @@ if (false) {}
865360
865460
  async function main2() {
865361
865461
  const args = process.argv.slice(2);
865362
865462
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
865363
- console.log(`${"1.84.4"} (UR-Nexus)`);
865463
+ console.log(`${"1.84.5"} (UR-Nexus)`);
865364
865464
  return;
865365
865465
  }
865366
865466
  if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {