llm-relay 0.82.1 → 0.83.1

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.d.ts CHANGED
@@ -19,7 +19,7 @@ import { type KeysCliDependencies } from "./keys-cli.js";
19
19
  export declare const FLAG_ALIASES: Readonly<Record<string, readonly string[]>>;
20
20
  export declare const CLI_FLAG_ALIASES: Readonly<Record<string, readonly string[]>>;
21
21
  export declare function expandFlagAliases(flags: readonly string[]): Set<string>;
22
- export declare const CANONICAL_VALUE_FLAGS: readonly ["--config", "--provider", "--default", "--mode", "--listen", "--task", "--exhausted", "--outcome", "--retry-after-ms", "--after", "--lane", "--tier", "--host", "--client", "--scope", "--credential", "--include", "--window", "--by", "--effort", "--shell", "--class", "--members", "--cost-class", "--rationale", "--reset-field", "--reset-ms", "--sig", "--import", "--label", "--env-name", "--out", "--repo"];
22
+ export declare const CANONICAL_VALUE_FLAGS: readonly ["--config", "--provider", "--default", "--mode", "--listen", "--task", "--exhausted", "--outcome", "--retry-after-ms", "--after", "--lane", "--tier", "--host", "--client", "--relay-model", "--scope", "--credential", "--include", "--window", "--by", "--effort", "--shell", "--class", "--members", "--cost-class", "--rationale", "--reset-field", "--reset-ms", "--sig", "--import", "--label", "--env-name", "--out", "--repo"];
23
23
  export declare const VALUE_FLAGS: Set<string>;
24
24
  export declare function argValue(...flags: string[]): string | undefined;
25
25
  export declare function hasFlag(...flags: string[]): boolean;
package/dist/cli.js CHANGED
@@ -100,6 +100,7 @@ export const CANONICAL_VALUE_FLAGS = [
100
100
  "--tier",
101
101
  "--host",
102
102
  "--client",
103
+ "--relay-model",
103
104
  "--scope",
104
105
  "--credential",
105
106
  "--include",
@@ -280,6 +281,11 @@ ${formatTextTable([
280
281
  ["--json", "Print JSON."],
281
282
  ], " ")}
282
283
 
284
+ Setup options:
285
+ ${formatTextTable([
286
+ ["--relay-model <alias>", "Model line of the installed relay agent (default: haiku; inherit is refused)."],
287
+ ], " ")}
288
+
283
289
  General options:
284
290
  ${formatTextTable([
285
291
  ["-c, --config <path>", "Config path."],
@@ -956,7 +962,7 @@ export const ARITY_GUARDED_COMMANDS = Object.keys(COMMAND_ARITY);
956
962
  export const CLI_OPTIONS = {
957
963
  proxy: ["--config", "--default", "--mode", "--listen", "--ping"],
958
964
  onboard: ["--config", "--import", "--force"],
959
- setup: [],
965
+ setup: ["--relay-model"],
960
966
  "check-keys": ["--config"],
961
967
  models: ["--config", "--provider", "--refresh"],
962
968
  ping: ["--config", "--provider", "--ping"],
@@ -2891,7 +2897,7 @@ import { probeAllPools } from "./pool-health.js";
2891
2897
  import { runInteractiveOnboarding, getOnboardingStatusList } from "./onboarding.js";
2892
2898
  import { detectHosts } from "./installed-hosts.js";
2893
2899
  import { importKeysFromFile } from "./key-import.js";
2894
- import { setupClaudeCli, setupClaudeDesktop } from "./setup-claude.js";
2900
+ import { relayAgentModelRefusal, setupClaudeCli, setupClaudeDesktop } from "./setup-claude.js";
2895
2901
  import { getTelemetryReport } from "./telemetry.js";
2896
2902
  import { globalCircuitBreaker } from "./circuit-breaker.js";
2897
2903
  const KEYS_SUBCOMMANDS = [
@@ -3037,15 +3043,21 @@ export function main() {
3037
3043
  process.exit(1);
3038
3044
  });
3039
3045
  }
3040
- function runSetupSubcommand(target) {
3046
+ function runSetupSubcommand(target, relayModel) {
3047
+ if (relayModel !== undefined) {
3048
+ const refusal = relayAgentModelRefusal(relayModel);
3049
+ if (refusal !== undefined)
3050
+ configCommandError(`setup: ${refusal}`);
3051
+ }
3052
+ const setupOpts = relayModel === undefined ? {} : { model: relayModel };
3041
3053
  if (target === "claude-desktop" || target === "desktop") {
3042
- const res = setupClaudeDesktop();
3054
+ const res = setupClaudeDesktop(setupOpts);
3043
3055
  process.stdout.write(`${res.message}\n`);
3044
3056
  if (!res.success)
3045
3057
  process.exit(1);
3046
3058
  }
3047
3059
  else if (target === undefined || target === "claude-cli" || target === "cli" || target === "claude") {
3048
- const res = setupClaudeCli();
3060
+ const res = setupClaudeCli(setupOpts);
3049
3061
  if (!res.success)
3050
3062
  process.exit(1);
3051
3063
  }
@@ -3102,7 +3114,7 @@ export function main() {
3102
3114
  return;
3103
3115
  }
3104
3116
  if (arg2 === "setup") {
3105
- runSetupSubcommand(arg3);
3117
+ runSetupSubcommand(arg3, argValue("--relay-model"));
3106
3118
  return;
3107
3119
  }
3108
3120
  if (arg2 === "telemetry") {