@howaboua/pi-gpt-switcher 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @howaboua/pi-gpt-switcher
2
2
 
3
+ ## 0.1.3
4
+
5
+ - GPT-6 Sol and Luna now share Astra's Codex support.
6
+
7
+ - Removed `/terra`; use `/luna` instead.
8
+ - Added Responses Lite, non-destructive reasoning changes and terse context guidance for GPT-6 Sol and Luna.
9
+ - Image descriptions now use GPT-6 Luna directly instead of preferring older mini models.
10
+ - Cost estimates now use published GPT-6 Sol and Luna rates, including cache writes and long-context pricing.
11
+ - Agent, review, exploration, web search, voice summary and image-description defaults now use GPT-6; Luna replaces Terra defaults. GPT Switcher retains Luna's 472K context limit, while Codex Conversion defaults all three GPT-6 models to 272K.
12
+
13
+ ## 0.1.2
14
+
15
+ - Add /astra for GPT-6 Astra with low reasoning by default and an optional reasoning override.
16
+
3
17
  ## 0.1.1
4
18
 
5
19
  ### Changes
package/README.md CHANGED
@@ -4,9 +4,9 @@ Pi extension adding quick model commands:
4
4
 
5
5
  | Command | Model |
6
6
  | --- | --- |
7
- | `/sol [reasoning]` | `openai-codex/gpt-5.6-sol` |
8
- | `/terra [reasoning]` | `openai-codex/gpt-5.6-terra` |
9
- | `/luna [reasoning]` | `openai-codex/gpt-5.6-luna` |
7
+ | `/sol [reasoning]` | `openai-codex/gpt-6-sol` |
8
+ | `/luna [reasoning]` | `openai-codex/gpt-6-luna` |
9
+ | `/astra [reasoning]` | `openai-codex/gpt-6-astra` |
10
10
 
11
11
  An explicit reasoning argument overrides the configured default. Valid arguments
12
12
  are `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`; for example,
@@ -20,8 +20,8 @@ agent directory:
20
20
  ```json
21
21
  {
22
22
  "sol": { "contextWindow": 272000, "reasoning": "high" },
23
- "terra": { "contextWindow": 872000, "reasoning": "high" },
24
- "luna": { "contextWindow": 472000, "reasoning": "xhigh" }
23
+ "luna": { "contextWindow": 472000, "reasoning": "xhigh" },
24
+ "astra": { "contextWindow": 272000, "reasoning": "low" }
25
25
  }
26
26
  ```
27
27
 
@@ -30,6 +30,8 @@ reasoning. Changes apply on the next shortcut invocation and do not alter the
30
30
  provider catalogue. Context windows may be lowered to 128k but not raised
31
31
  above the shortcut's shipped limit.
32
32
 
33
+ Existing config files need no migration: omitted shortcuts use their shipped defaults, and unknown entries are ignored.
34
+
33
35
  ## Install
34
36
 
35
37
  ```bash
package/biome.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.5.10/schema.json",
3
3
  "vcs": {
4
4
  "enabled": true,
5
5
  "clientKind": "git",
package/changelog.ts CHANGED
@@ -182,9 +182,19 @@ function packageMarkdown(
182
182
  registration: PackageRegistration,
183
183
  entries: ChangelogEntry[],
184
184
  ): string {
185
+ const body = (entry: ChangelogEntry) =>
186
+ entry.content
187
+ .replace(/^##[^\n]*\n*/, "")
188
+ .replace(/^###\s+(?:Changes|Minor Changes|Patch Changes)\s*\n*/gim, "")
189
+ .replace(/^###\s+(.+)$/gm, "**$1**");
190
+ if (entries.length === 1) {
191
+ const [entry] = entries;
192
+ if (!entry) return "";
193
+ return `## ${registration.name} ${entry.version}\n\n${body(entry)}`;
194
+ }
185
195
  return [
186
196
  `## ${registration.name}`,
187
- ...entries.map((entry) => entry.content.replace(/^##\s+/, "### ")),
197
+ ...entries.map((entry) => `**${entry.version}**\n\n${body(entry)}`),
188
198
  ].join("\n\n");
189
199
  }
190
200
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Adds short slash commands for the three OpenAI Codex model variants.
2
+ * Adds short slash commands for OpenAI Codex model variants.
3
3
  * The commands use Pi's model registry, so normal provider authentication and
4
4
  * model availability checks remain in charge.
5
5
  */
@@ -15,9 +15,9 @@ import {
15
15
  } from "./config.js";
16
16
 
17
17
  const MODELS = {
18
- sol: "gpt-5.6-sol",
19
- terra: "gpt-5.6-terra",
20
- luna: "gpt-5.6-luna",
18
+ sol: { id: "gpt-6-sol", name: "GPT-6 Sol" },
19
+ luna: { id: "gpt-6-luna", name: "GPT-6 Luna" },
20
+ astra: { id: "gpt-6-astra", name: "GPT-6 Astra" },
21
21
  } as const;
22
22
 
23
23
  type Alias = keyof typeof MODELS & ShortcutAlias;
@@ -41,8 +41,9 @@ export default function (
41
41
  if (!options.getConfig) ensureGptSwitcherConfig();
42
42
 
43
43
  for (const alias of Object.keys(MODELS) as Alias[]) {
44
+ const shortcut = MODELS[alias];
44
45
  pi.registerCommand(alias, {
45
- description: `Switch to GPT-5.6 ${alias.charAt(0).toUpperCase()}${alias.slice(1)}`,
46
+ description: `Switch to ${shortcut.name}`,
46
47
  handler: async (args, ctx) => {
47
48
  const defaults = getConfig()[alias];
48
49
  const thinkingLevel = parseThinkingLevel(args, defaults.reasoning);
@@ -54,7 +55,7 @@ export default function (
54
55
  return;
55
56
  }
56
57
 
57
- const modelId = MODELS[alias];
58
+ const modelId = shortcut.id;
58
59
  const model = ctx.modelRegistry.find("openai-codex", modelId);
59
60
 
60
61
  if (!model) {
package/config.ts CHANGED
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { getAgentDir } from "@earendil-works/pi-coding-agent";
4
4
 
5
- export const SHORTCUT_ALIASES = ["sol", "terra", "luna"] as const;
5
+ export const SHORTCUT_ALIASES = ["sol", "luna", "astra"] as const;
6
6
  export type ShortcutAlias = (typeof SHORTCUT_ALIASES)[number];
7
7
  export type ThinkingLevel =
8
8
  | "off"
@@ -32,8 +32,8 @@ export type GptSwitcherConfig = Record<ShortcutAlias, ShortcutDefaults>;
32
32
 
33
33
  export const DEFAULT_GPT_SWITCHER_CONFIG: GptSwitcherConfig = {
34
34
  sol: { contextWindow: 272_000, reasoning: "high" },
35
- terra: { contextWindow: 872_000, reasoning: "high" },
36
35
  luna: { contextWindow: 472_000, reasoning: "xhigh" },
36
+ astra: { contextWindow: 272_000, reasoning: "low" },
37
37
  };
38
38
 
39
39
  const CONFIG_BASENAME = "pi-gpt-switcher.json";
package/index.ts CHANGED
@@ -1,3 +1,13 @@
1
1
  /** Pi package entry point for the Codex model shortcut extension. */
2
2
 
3
- export { default } from "./codex-model-shortcuts.js";
3
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
4
+ import registerPackageChangelog from "./changelog.js";
5
+ import registerCodexModelShortcuts from "./codex-model-shortcuts.js";
6
+
7
+ export default function gptSwitcher(
8
+ pi: ExtensionAPI,
9
+ options: Parameters<typeof registerCodexModelShortcuts>[1] = {},
10
+ ): void {
11
+ registerPackageChangelog(pi);
12
+ registerCodexModelShortcuts(pi, options);
13
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@howaboua/pi-gpt-switcher",
3
- "version": "0.1.1",
4
- "description": "Quick Pi commands for switching between GPT-5.6 Codex models and reasoning levels.",
3
+ "version": "0.1.3",
4
+ "description": "Quick Pi commands for switching between GPT Codex models and reasoning levels.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Igor Warzocha",
@@ -18,7 +18,7 @@
18
18
  "pi-package",
19
19
  "pi-extension",
20
20
  "pi-coding-agent",
21
- "gpt-5.6",
21
+ "gpt-6",
22
22
  "model-switching",
23
23
  "reasoning-level"
24
24
  ],
@@ -41,18 +41,17 @@
41
41
  ],
42
42
  "pi": {
43
43
  "extensions": [
44
- "./changelog.ts",
45
44
  "./index.ts"
46
45
  ]
47
46
  },
48
47
  "peerDependencies": {
49
- "@earendil-works/pi-coding-agent": ">=0.80.6",
50
- "@earendil-works/pi-tui": "*"
48
+ "@earendil-works/pi-coding-agent": ">=0.84.3",
49
+ "@earendil-works/pi-tui": ">=0.84.3"
51
50
  },
52
51
  "devDependencies": {
53
- "@biomejs/biome": "^2.4.16",
54
- "@earendil-works/pi-coding-agent": "0.82.0",
55
- "typescript": "^6.0.3"
52
+ "@biomejs/biome": "^2.5.10",
53
+ "@earendil-works/pi-coding-agent": "0.87.0",
54
+ "typescript": "^7.0.2"
56
55
  },
57
56
  "scripts": {
58
57
  "check": "bun run lint && bun run typecheck && bun run test",