ghc-tunnel 1.0.4 → 1.0.5

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/README.md CHANGED
@@ -66,14 +66,14 @@ Run `ghc-tunnel --setup --claudecode` or manually configure `~/.claude/settings.
66
66
 
67
67
  `ghc-tunnel` exposes the OpenAI Responses API (`/v1/responses`) with Codex-specific adapters so the Codex CLI can drive Copilot models directly.
68
68
 
69
- On startup ghc-tunnel automatically repairs `~/.codex/config.toml` — if any of `model`, `model_reasoning_effort`, `personality`, `model_provider`, or the `[model_providers.ghc-tunnel]` block is missing (or the block is partial), the missing pieces are filled in. When `model` or `model_reasoning_effort` is absent it prompts interactively (defaults: `gpt-5.4` / `high`, `xhigh` also valid).
69
+ On startup ghc-tunnel automatically repairs `~/.codex/config.toml` — if any of `model`, `model_reasoning_effort`, `personality`, `model_provider`, or the `[model_providers.ghc-tunnel]` block is missing (or the block is partial), the missing pieces are filled in. When `model` or `model_reasoning_effort` is absent it prompts interactively (defaults: `gpt-5.5` / `high`, `xhigh` also valid).
70
70
 
71
71
  `ghc-tunnel --setup` forces a full rewrite of those keys (still prompting for model + reasoning).
72
72
 
73
73
  Resulting config:
74
74
 
75
75
  ```toml
76
- model = "gpt-5.4"
76
+ model = "gpt-5.5"
77
77
  model_reasoning_effort = "high"
78
78
  personality = "pragmatic"
79
79
  model_provider = "ghc-tunnel"
package/dist/index.js CHANGED
@@ -175,7 +175,7 @@ tool_result_suffix_remove: []
175
175
 
176
176
  max_connection_retries: 3
177
177
  `;S.default.writeFileSync(r,i,"utf-8"),console.log(` ${D}\u2713${g} Config saved to ${K}${r}${g}`)}function ht(t,e){let o=M.default.join(process.env.HOME||"~",".claude"),n=M.default.join(o,"settings.json"),s={};if(S.default.existsSync(n))try{s=JSON.parse(S.default.readFileSync(n,"utf-8"))}catch{console.log(` ${se}\u26A0${g} Could not parse existing settings.json, creating new one`)}let r=`http://${e}:${t}/`,i=s.env??{};i.ANTHROPIC_BASE_URL=r,i.ANTHROPIC_AUTH_TOKEN="dummy",i.ANTHROPIC_MODEL=z,i.ANTHROPIC_DEFAULT_HAIKU_MODEL=z,i.DISABLE_NON_ESSENTIAL_MODEL_CALLS="1",i.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1",delete i.ANTHROPIC_SMALL_FAST_MODEL,s.env=i,S.default.mkdirSync(o,{recursive:!0}),S.default.writeFileSync(n,JSON.stringify(s,null,2)+`
178
- `,"utf-8"),console.log(` ${D}\u2713${g} Claude Code settings updated at ${K}${n}${g}`),console.log(` ${w}ANTHROPIC_BASE_URL = ${r}${g}`),console.log(` ${w}ANTHROPIC_MODEL = ${z}${g}`),console.log(` ${w}ANTHROPIC_DEFAULT_HAIKU_MODEL = ${z}${g}`)}var ze="gpt-5.4",F="ghc-tunnel",yt="GHC TUNNEL",Je="high",Rt="pragmatic";function X(t,e,o){let n=t.search(/(^|\n)\[/),s=n===-1?t:t.slice(0,n),r=n===-1?"":t.slice(n),i=`${e} = ${o}`,c=new RegExp(`^${e}\\s*=.*$`,"m");if(c.test(s))return s.replace(c,i)+r;let a=s.length===0||s.endsWith(`
178
+ `,"utf-8"),console.log(` ${D}\u2713${g} Claude Code settings updated at ${K}${n}${g}`),console.log(` ${w}ANTHROPIC_BASE_URL = ${r}${g}`),console.log(` ${w}ANTHROPIC_MODEL = ${z}${g}`),console.log(` ${w}ANTHROPIC_DEFAULT_HAIKU_MODEL = ${z}${g}`)}var ze="gpt-5.5",F="ghc-tunnel",yt="GHC TUNNEL",Je="high",Rt="pragmatic";function X(t,e,o){let n=t.search(/(^|\n)\[/),s=n===-1?t:t.slice(0,n),r=n===-1?"":t.slice(n),i=`${e} = ${o}`,c=new RegExp(`^${e}\\s*=.*$`,"m");if(c.test(s))return s.replace(c,i)+r;let a=s.length===0||s.endsWith(`
179
179
  `)?"":`
180
180
  `;return`${s}${a}${i}
181
181
  ${r}`}function kt(t,e,o,n){let s=e.replace(/[.[\]]/g,a=>`\\${a}`),r=new RegExp(`(^|\\n)\\[${s}\\][^\\[]*?(?=\\n\\[|$)`),i=`[${e}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghc-tunnel",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "GitHub Copilot API Proxy - Provides OpenAI and Anthropic compatible endpoints via GitHub Copilot",
5
5
  "main": "dist/index.js",
6
6
  "bin": {