pleumrouter 0.5.43 → 0.5.45

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/src/recipes.mjs CHANGED
@@ -15,14 +15,14 @@ const nativeOrCustom = (explicit) => explicit && typeof explicit === "object"
15
15
 
16
16
  export const CORE_MODELS = [
17
17
  "deepseek-ai/DeepSeek-V4.1-Flash",
18
- "claude-sonnet-5",
18
+ "claude-sonnet-5-5",
19
19
  "claude-opus-5-5",
20
+ "gpt-6.1-sol",
20
21
  "gpt-6-astra",
21
- "gpt-6-sol",
22
22
  "gpt-6-luna",
23
+ "gemini-4-argon",
23
24
  "gemini-3.8-flash",
24
25
  "qwen3.8-max",
25
- "glm-5.3-flash",
26
26
  "kimi-k3",
27
27
  ];
28
28
 
@@ -59,46 +59,33 @@ export const RECIPES = {
59
59
  // Claude 모델의 provider-qualified ID만 보정한다. 다른 회사 모델에
60
60
  // anthropic/을 붙이면 카탈로그에 없는 ID가 되어 요청이 실패한다.
61
61
  const toAnthropic = (x) => /^claude-/.test(x) ? `anthropic/${x}` : x;
62
+ const model = chosenModel(selection);
62
63
  return {
63
64
  ANTHROPIC_BASE_URL: ROOT,
64
65
  ANTHROPIC_AUTH_TOKEN: key,
65
- // CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY는 의도적으로 설정하지 않는다:
66
- // 활성화 시 Claude Code가 GET /v1/models를 호출해 카탈로그 200+개 모델을
67
- // /model 메뉴에 쏟아부어 화면이 난잡해지는 원인이 된다.
68
- ANTHROPIC_DEFAULT_SONNET_MODEL: toAnthropic("claude-sonnet-5"),
69
- ANTHROPIC_DEFAULT_SONNET_MODEL_NAME: "Sonnet",
70
- ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION: "Sonnet 5 · Efficient for routine tasks",
71
- ANTHROPIC_DEFAULT_OPUS_MODEL: toAnthropic("claude-opus-5-5"),
72
- ANTHROPIC_DEFAULT_OPUS_MODEL_NAME: "Opus",
73
- ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION: "Opus 5.5 · Best for everyday, complex tasks",
74
- ANTHROPIC_DEFAULT_FABLE_MODEL: toAnthropic("claude-fable-5-1"),
75
- ANTHROPIC_DEFAULT_FABLE_MODEL_NAME: "Fable",
76
- ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION: "Fable 5.1 · Long-running tasks",
77
- ANTHROPIC_DEFAULT_HAIKU_MODEL: toAnthropic("claude-haiku-4-5"),
78
- ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME: "Haiku",
79
- ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION: "Haiku 4.5 · Fastest for quick answers",
80
- ANTHROPIC_SMALL_MODEL: toAnthropic("claude-haiku-4-5"),
81
- ...(selection?.mode === "custom" ? {
82
- ANTHROPIC_CUSTOM_MODEL_OPTION: toAnthropic(selection.model),
83
- ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: `Pleum · ${selection.model}`,
66
+ ...(model ? {
67
+ ANTHROPIC_CUSTOM_MODEL_OPTION: toAnthropic(model),
68
+ ANTHROPIC_CUSTOM_MODEL_OPTION_NAME: `Pleum · ${model}`,
84
69
  ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION: "Selected in Pleum for this session",
85
70
  CLAUDE_CODE_SUBAGENT_MODEL: "sonnet",
86
71
  CLAUDE_CODE_SUBAGENT_MODEL_FORCE: "1",
87
72
  } : {}),
88
73
  };
89
74
  },
90
- args: (selection) => ["--model", selection?.mode === "custom"
91
- ? (/^claude-/.test(selection.model) ? `anthropic/${selection.model}` : selection.model)
92
- : "sonnet"],
75
+ args: (selection) => {
76
+ const model = chosenModel(selection);
77
+ if (!model) return [];
78
+ return ["--model", /^claude-/.test(model) ? `anthropic/${model}` : model];
79
+ },
93
80
  },
94
81
  codex: {
95
82
  label: "Codex CLI",
96
83
  bin: "codex",
97
84
  type: "env",
98
- defaultModel: "gpt-6-sol",
85
+ defaultModel: "gpt-6.1-sol",
99
86
  resolveModel: (explicit) => explicit && typeof explicit === "object"
100
87
  ? explicit
101
- : { mode: explicit ? "custom" : "native", model: explicit || "gpt-6-sol" },
88
+ : { mode: explicit ? "custom" : "native", model: explicit || "gpt-6.1-sol" },
102
89
  install: "npm i -g @openai/codex",
103
90
  attribution: {
104
91
  title: "Codex",
@@ -106,7 +93,7 @@ export const RECIPES = {
106
93
  },
107
94
  env: (key) => ({ PLEUM_API_KEY: key }),
108
95
  args: (model) => {
109
- const m = model && typeof model === "object" ? model.model : model;
96
+ const m = chosenModel(model);
110
97
  const provider = {
111
98
  name: "PleumRouter",
112
99
  base_url: V1,
@@ -115,11 +102,11 @@ export const RECIPES = {
115
102
  supports_websockets: false,
116
103
  };
117
104
  const providerToml = `{ ${Object.entries(provider).map(([k, v]) => `${k} = ${typeof v === "boolean" ? v : tomlBasicString(v)}`).join(", ")} }`;
118
- return [
105
+ const baseArgs = [
119
106
  "-c", 'model_provider="pleum"',
120
107
  "-c", `model_providers.pleum=${providerToml}`,
121
- "--model", m || "gpt-6-sol",
122
108
  ];
109
+ return m ? [...baseArgs, "--model", m] : baseArgs;
123
110
  },
124
111
  },
125
112
  agy: {
@@ -182,7 +169,7 @@ export const RECIPES = {
182
169
  }),
183
170
  };
184
171
  },
185
- args: () => [],
172
+ args: () => ["--standalone"],
186
173
  },
187
174
  aider: {
188
175
  label: "Aider",
@@ -465,7 +452,7 @@ export function tomlBasicString(value) {
465
452
 
466
453
  export function codexToml(model, effort) {
467
454
  const isObj = model && typeof model === "object";
468
- const m = (isObj ? model.model : model) || "gpt-6-sol";
455
+ const m = (isObj ? model.model : model) || "gpt-6.1-sol";
469
456
  const eff = (isObj ? model.effort : effort) || null;
470
457
  const effortLine = eff ? `model_reasoning_effort = ${tomlBasicString(eff)}\n` : "";
471
458
  return `# Generated by pleum CLI. Isolated CODEX_HOME — your ~/.codex is untouched.
@@ -489,10 +476,10 @@ export function mergeAgySettings(existingJson, model) {
489
476
  throw new Error("agy settings.json must be a JSON object");
490
477
  }
491
478
  }
492
- const m = typeof model === "object" ? model?.cliModel || model?.model : model;
479
+ const isNative = model && typeof model === "object" && model.mode === "native";
480
+ const m = !isNative ? (typeof model === "object" ? model?.cliModel || model?.model : model) : undefined;
493
481
  const settings = { ...obj, modelProvider: "gemini" };
494
482
  if (m) settings.model = m;
495
- else delete settings.model;
496
483
  return settings;
497
484
  }
498
485