@cruxy/cli 1.0.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,8 +51,9 @@ export const FORBIDDEN_TERMS = [
51
51
  ];
52
52
  /**
53
53
  * Upstream model names — the base-model gag. None may appear in user-facing
54
- * copy; only {@link MODEL_TIERS} ever do. `anthropic`/`openai` are deliberately
55
- * absent: they are real bring-your-own-provider config values, not model names.
54
+ * copy; only {@link MODEL_TIERS} ever do. Provider ids (e.g. `openai`) are
55
+ * deliberately absent: they are real bring-your-own-provider config values, not
56
+ * model names.
56
57
  */
57
58
  export const FORBIDDEN_MODEL_NAMES = /\b(claude|sonnet|opus|haiku|gpt-?\d|gemini|llama|mistral)\b/i;
58
59
  /** The neutral token an upstream model name is replaced with in user-facing copy. */
@@ -103,7 +104,7 @@ function isModelId(run) {
103
104
  * Scrubs model ids as whole TOKENS, never a bare vendor word or a substring
104
105
  * inside an unrelated word/path — so legitimate output (`/home/claude`, the
105
106
  * `opus` codec, a `claude-bot` username) is left intact (see {@link isModelId}).
106
- * Provider names (`anthropic`/`openai`) are absent from the set, so bring-your-own
107
+ * Provider ids (e.g. `openai`) are absent from the set, so bring-your-own
107
108
  * provider config values survive too.
108
109
  */
109
110
  export function scrubModelNames(text) {
@@ -86,8 +86,6 @@ export function prCommand() {
86
86
  /** Environment variable that holds the API key for a provider. */
87
87
  function apiKeyEnvVar(provider) {
88
88
  switch (provider) {
89
- case "anthropic":
90
- return "ANTHROPIC_API_KEY";
91
89
  case "openai":
92
90
  return "OPENAI_API_KEY";
93
91
  default:
@@ -11,8 +11,6 @@ import { buildAgentSession } from "./session-factory.js";
11
11
  /** The env var that holds the key for a provider (for the fail-loud message). */
12
12
  export function apiKeyEnvVar(provider) {
13
13
  switch (provider) {
14
- case "anthropic":
15
- return "ANTHROPIC_API_KEY";
16
14
  case "openai":
17
15
  return "OPENAI_API_KEY";
18
16
  default:
@@ -179,8 +179,6 @@ function envApiKey(provider) {
179
179
  switch (provider) {
180
180
  case "cruxy":
181
181
  return process.env.CRUXY_API_KEY;
182
- case "anthropic":
183
- return process.env.ANTHROPIC_API_KEY;
184
182
  case "openai":
185
183
  return process.env.OPENAI_API_KEY;
186
184
  default:
@@ -2,17 +2,12 @@ import { z } from "zod";
2
2
  import { LOG_LEVELS } from "../utils/logger.js";
3
3
  import { MODEL_TIERS } from "../brand/voice.js";
4
4
  import { TASK_CLASSES } from "../routing/types.js";
5
- export const ProviderSchema = z.enum([
6
- "cruxy",
7
- "anthropic",
8
- "openai",
9
- "custom",
10
- ]);
5
+ export const ProviderSchema = z.enum(["cruxy", "openai", "custom"]);
11
6
  export const ModelConfigSchema = z
12
7
  .object({
13
8
  provider: ProviderSchema.default("cruxy"),
14
- // Cruxy tiers: "kavi" | "vaani" | "mira", or "auto" (shimmed to a default
15
- // tier client-side until the gateway ships server-side routing).
9
+ // Cruxy tiers: "kavi" | "vaani" | "mira", or "auto" (the v2 gateway routes
10
+ // "auto" server-side; the served tier comes back in the response routing).
16
11
  model: z.string().default("auto"),
17
12
  maxTokens: z.number().int().positive().default(8192),
18
13
  temperature: z.number().min(0).max(2).default(0),
@@ -65,7 +65,7 @@ export function providerUnsupported(provider) {
65
65
  title: `provider "${provider}" does not support tool use`,
66
66
  cause: "cruxy run drives an agent loop, which requires a tool-capable provider",
67
67
  nextSteps: [
68
- "switch to a tool-capable provider, e.g. `cruxy config set model.provider anthropic`",
68
+ "switch to a tool-capable provider, e.g. `cruxy config set model.provider cruxy`",
69
69
  ],
70
70
  meta: { provider },
71
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruxy/cli",
3
- "version": "1.0.5",
3
+ "version": "1.2.0",
4
4
  "description": "an agentic coding CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "undici": "^6.21.0",
37
37
  "zod": "^3.23.8",
38
38
  "zod-to-json-schema": "^3.23.5",
39
- "@cruxy/sdk": "0.2.2"
39
+ "@cruxy/sdk": "0.4.0"
40
40
  },
41
41
  "optionalDependencies": {
42
42
  "better-sqlite3": "^12.11.1"