@howaboua/pi-gpt-switcher 0.1.5 → 0.1.6

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,9 @@
1
1
  # @howaboua/pi-gpt-switcher
2
2
 
3
+ ## 0.1.6
4
+
5
+ - Added `/terra` to switch to GPT-6.1 Terra with configurable context and reasoning defaults.
6
+
3
7
  ## 0.1.5
4
8
 
5
9
  - Fixed model shortcuts rejecting configured context windows above their defaults.
@@ -11,7 +15,6 @@
11
15
  ## 0.1.3
12
16
 
13
17
  - GPT-6 Sol and Luna now share Astra's Codex support.
14
-
15
18
  - Removed `/terra`; use `/luna` instead.
16
19
  - Added Responses Lite, non-destructive reasoning changes and terse context guidance for GPT-6 Sol and Luna.
17
20
  - Image descriptions now use GPT-6 Luna directly instead of preferring older mini models.
package/README.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  Pi extension adding quick model commands:
4
4
 
5
- | Command | Model |
6
- | --- | --- |
7
- | `/sol [reasoning]` | `openai-codex/gpt-6.1-sol` |
8
- | `/luna [reasoning]` | `openai-codex/gpt-6-luna` |
9
- | `/astra [reasoning]` | `openai-codex/gpt-6-astra` |
5
+ | Command | Model |
6
+ | -------------------- | ---------------------------- |
7
+ | `/sol [reasoning]` | `openai-codex/gpt-6.1-sol` |
8
+ | `/terra [reasoning]` | `openai-codex/gpt-6.1-terra` |
9
+ | `/luna [reasoning]` | `openai-codex/gpt-6-luna` |
10
+ | `/astra [reasoning]` | `openai-codex/gpt-6-astra` |
10
11
 
11
12
  An explicit reasoning argument overrides the configured default. Valid arguments
12
13
  are `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`; for example,
@@ -19,9 +20,10 @@ agent directory:
19
20
 
20
21
  ```json
21
22
  {
22
- "sol": { "contextWindow": 272000, "reasoning": "high" },
23
- "luna": { "contextWindow": 472000, "reasoning": "xhigh" },
24
- "astra": { "contextWindow": 272000, "reasoning": "low" }
23
+ "sol": { "contextWindow": 272000, "reasoning": "high" },
24
+ "terra": { "contextWindow": 272000, "reasoning": "high" },
25
+ "luna": { "contextWindow": 472000, "reasoning": "xhigh" },
26
+ "astra": { "contextWindow": 272000, "reasoning": "low" }
25
27
  }
26
28
  ```
27
29
 
package/biome.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.10/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.3/schema.json",
3
3
  "vcs": {
4
4
  "enabled": true,
5
5
  "clientKind": "git",
@@ -16,6 +16,7 @@ import {
16
16
 
17
17
  const MODELS = {
18
18
  sol: { id: "gpt-6.1-sol", name: "GPT-6.1 Sol" },
19
+ terra: { id: "gpt-6.1-terra", name: "GPT-6.1 Terra" },
19
20
  luna: { id: "gpt-6-luna", name: "GPT-6 Luna" },
20
21
  astra: { id: "gpt-6-astra", name: "GPT-6 Astra" },
21
22
  } as const;
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", "luna", "astra"] as const;
5
+ const SHORTCUT_ALIASES = ["sol", "terra", "luna", "astra"] as const;
6
6
  export type ShortcutAlias = (typeof SHORTCUT_ALIASES)[number];
7
7
  export type ThinkingLevel =
8
8
  | "off"
@@ -23,15 +23,16 @@ export const THINKING_LEVELS = new Set<ThinkingLevel>([
23
23
  "max",
24
24
  ]);
25
25
 
26
- export type ShortcutDefaults = {
26
+ type ShortcutDefaults = {
27
27
  contextWindow: number;
28
28
  reasoning: ThinkingLevel;
29
29
  };
30
30
 
31
31
  export type GptSwitcherConfig = Record<ShortcutAlias, ShortcutDefaults>;
32
32
 
33
- export const DEFAULT_GPT_SWITCHER_CONFIG: GptSwitcherConfig = {
33
+ const DEFAULT_GPT_SWITCHER_CONFIG: GptSwitcherConfig = {
34
34
  sol: { contextWindow: 272_000, reasoning: "high" },
35
+ terra: { contextWindow: 272_000, reasoning: "high" },
35
36
  luna: { contextWindow: 472_000, reasoning: "xhigh" },
36
37
  astra: { contextWindow: 272_000, reasoning: "low" },
37
38
  };
@@ -82,7 +83,7 @@ function normalizeReasoning(
82
83
  return fallback;
83
84
  }
84
85
 
85
- export function normalizeGptSwitcherConfig(value: unknown): GptSwitcherConfig {
86
+ function normalizeGptSwitcherConfig(value: unknown): GptSwitcherConfig {
86
87
  if (!isObject(value)) {
87
88
  configurationError("configuration must be a JSON object; using defaults");
88
89
  return structuredClone(DEFAULT_GPT_SWITCHER_CONFIG);
@@ -116,9 +117,7 @@ export function normalizeGptSwitcherConfig(value: unknown): GptSwitcherConfig {
116
117
  ) as GptSwitcherConfig;
117
118
  }
118
119
 
119
- export function getGptSwitcherConfigPath(
120
- agentDir: string = getAgentDir(),
121
- ): string {
120
+ function getGptSwitcherConfigPath(agentDir: string = getAgentDir()): string {
122
121
  return join(agentDir, CONFIG_BASENAME);
123
122
  }
124
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/pi-gpt-switcher",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Quick Pi commands for switching between GPT Codex models and reasoning levels.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,14 +49,13 @@
49
49
  "@earendil-works/pi-tui": ">=1.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@biomejs/biome": "^2.5.10",
53
- "@earendil-works/pi-coding-agent": "1.0.4",
52
+ "@biomejs/biome": "^2.6.3",
53
+ "@earendil-works/pi-coding-agent": "1.4.0",
54
54
  "typescript": "^7.0.2"
55
55
  },
56
56
  "scripts": {
57
- "check": "bun run lint && bun run typecheck && bun run test",
57
+ "check": "bun run lint && bun run typecheck",
58
58
  "prepack": "bun run check",
59
- "test": "bun test",
60
59
  "typecheck": "tsgo --noEmit",
61
60
  "lint": "biome check .",
62
61
  "format": "biome check --write .",