@gengjiawen/os-init 2.0.0 → 2.1.1

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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.1](https://github.com/gengjiawen/os-init/compare/v2.1.0...v2.1.1) (2026-10-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * stop Claude Code auto-mode classifier warning on the gateway ([#55](https://github.com/gengjiawen/os-init/issues/55)) ([8f2470f](https://github.com/gengjiawen/os-init/commit/8f2470fbbfeb5d0e369b491285d2f97d70294dc6))
9
+
10
+ ## [2.1.0](https://github.com/gengjiawen/os-init/compare/v2.0.0...v2.1.0) (2026-09-30)
11
+
12
+
13
+ ### Features
14
+
15
+ * raise Codex auto-compact limit to 156k ([#54](https://github.com/gengjiawen/os-init/issues/54)) ([0656770](https://github.com/gengjiawen/os-init/commit/06567700c397a6161801a50f007c5cadc888b852))
16
+ * switch Codex default model to gpt-6.1-sol ([#52](https://github.com/gengjiawen/os-init/issues/52)) ([befd1a8](https://github.com/gengjiawen/os-init/commit/befd1a8ab1f1c9ced7aa7e6315357f81ed20f7d0))
17
+
3
18
  ## [2.0.0](https://github.com/gengjiawen/os-init/compare/v1.28.1...v2.0.0) (2026-09-29)
4
19
 
5
20
 
@@ -11,6 +11,7 @@ const utils_1 = require("./utils");
11
11
  const CLAUDE_BASE_URL = 'https://ai.gengjiawen.com/api/claude/';
12
12
  const CLAUDE_AUTO_COMPACT_WINDOW = '128000';
13
13
  const CLAUDE_ATTRIBUTION_HEADER = '0';
14
+ const CLAUDE_AUTO_MODE_SERVER = '0';
14
15
  function getClaudeSettingsDir() {
15
16
  return path.join(os.homedir(), '.claude');
16
17
  }
@@ -33,7 +34,8 @@ const CLAUDE_SETTINGS_TEMPLATE = `{
33
34
  "ANTHROPIC_BASE_URL": "${CLAUDE_BASE_URL}",
34
35
  "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
35
36
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "${CLAUDE_AUTO_COMPACT_WINDOW}",
36
- "CLAUDE_CODE_ATTRIBUTION_HEADER": "${CLAUDE_ATTRIBUTION_HEADER}"
37
+ "CLAUDE_CODE_ATTRIBUTION_HEADER": "${CLAUDE_ATTRIBUTION_HEADER}",
38
+ "CLAUDE_CODE_AUTO_MODE_SERVER": "${CLAUDE_AUTO_MODE_SERVER}"
37
39
  },
38
40
  "includeCoAuthoredBy": false,
39
41
  "apiKeyHelper": "echo 'API_KEY_PLACEHOLDER'",
@@ -75,6 +77,10 @@ function writeVSCodeClaudePluginConfig(apiKey) {
75
77
  name: 'CLAUDE_CODE_ATTRIBUTION_HEADER',
76
78
  value: CLAUDE_ATTRIBUTION_HEADER,
77
79
  },
80
+ {
81
+ name: 'CLAUDE_CODE_AUTO_MODE_SERVER',
82
+ value: CLAUDE_AUTO_MODE_SERVER,
83
+ },
78
84
  ], {
79
85
  formattingOptions: {
80
86
  insertSpaces: true,
package/build/codex.js CHANGED
@@ -14,10 +14,10 @@ function getCodexConfigDir() {
14
14
  }
15
15
  function getCodexConfigTomlTemplate(bearerToken) {
16
16
  return `model_provider = "jw"
17
- model = "gpt-5.6-sol"
17
+ model = "gpt-6.1-sol"
18
18
  model_reasoning_effort = "high"
19
19
  plan_mode_reasoning_effort = "high"
20
- model_auto_compact_token_limit = 131072
20
+ model_auto_compact_token_limit = 159744
21
21
  disable_response_storage = true
22
22
  check_for_update_on_startup = false
23
23
 
@@ -84,6 +84,7 @@ describe('writeClaudeConfig', () => {
84
84
  expect(claudeSettings).not.toContain('CLAUDE_CODE_DISABLE_1M_CONTEXT')
85
85
  expect(claudeSettings).not.toContain('CLAUDE_CODE_EFFORT_LEVEL')
86
86
  expect(claudeSettings).toContain('"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"')
87
+ expect(claudeSettings).toContain('"CLAUDE_CODE_AUTO_MODE_SERVER": "0"')
87
88
 
88
89
  const vscodeSettings = fs.readFileSync(result.vscodeSettingsPath, 'utf8')
89
90
  expect(vscodeSettings).toContain('"editor.fontSize": 14')
@@ -97,6 +98,7 @@ describe('writeClaudeConfig', () => {
97
98
  expect(vscodeSettings).toContain('"128000"')
98
99
  expect(vscodeSettings).not.toContain('CLAUDE_CODE_DISABLE_1M_CONTEXT')
99
100
  expect(vscodeSettings).toContain('"CLAUDE_CODE_ATTRIBUTION_HEADER"')
101
+ expect(vscodeSettings).toContain('"CLAUDE_CODE_AUTO_MODE_SERVER"')
100
102
  expect(vscodeSettings).toContain('"0"')
101
103
  expect(vscodeSettings).toContain('"1"')
102
104
  expect(vscodeSettings).toContain('"test-api-key"')
@@ -14,6 +14,9 @@ import {
14
14
  const CLAUDE_BASE_URL = 'https://ai.gengjiawen.com/api/claude/'
15
15
  const CLAUDE_AUTO_COMPACT_WINDOW = '128000'
16
16
  const CLAUDE_ATTRIBUTION_HEADER = '0'
17
+ // The gateway does not pass auto-mode server classifier checks through.
18
+ // Leave them off so Claude Code does not warn on every session.
19
+ const CLAUDE_AUTO_MODE_SERVER = '0'
17
20
 
18
21
  /** Return Claude settings directory path */
19
22
  function getClaudeSettingsDir(): string {
@@ -53,7 +56,8 @@ const CLAUDE_SETTINGS_TEMPLATE = `{
53
56
  "ANTHROPIC_BASE_URL": "${CLAUDE_BASE_URL}",
54
57
  "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
55
58
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "${CLAUDE_AUTO_COMPACT_WINDOW}",
56
- "CLAUDE_CODE_ATTRIBUTION_HEADER": "${CLAUDE_ATTRIBUTION_HEADER}"
59
+ "CLAUDE_CODE_ATTRIBUTION_HEADER": "${CLAUDE_ATTRIBUTION_HEADER}",
60
+ "CLAUDE_CODE_AUTO_MODE_SERVER": "${CLAUDE_AUTO_MODE_SERVER}"
57
61
  },
58
62
  "includeCoAuthoredBy": false,
59
63
  "apiKeyHelper": "echo 'API_KEY_PLACEHOLDER'",
@@ -113,6 +117,10 @@ function writeVSCodeClaudePluginConfig(apiKey: string): {
113
117
  name: 'CLAUDE_CODE_ATTRIBUTION_HEADER',
114
118
  value: CLAUDE_ATTRIBUTION_HEADER,
115
119
  },
120
+ {
121
+ name: 'CLAUDE_CODE_AUTO_MODE_SERVER',
122
+ value: CLAUDE_AUTO_MODE_SERVER,
123
+ },
116
124
  ],
117
125
  {
118
126
  formattingOptions: {
@@ -23,7 +23,7 @@ describe('writeCodexConfig', () => {
23
23
  fs.rmSync(tempHome, { recursive: true, force: true })
24
24
  })
25
25
 
26
- test('writes config with bearer token and 128k auto compact threshold', () => {
26
+ test('writes config with bearer token and 156k auto compact threshold', () => {
27
27
  const result = writeCodexConfig('test-api-key')
28
28
  const configPath = path.join(tempHome, '.codex', 'config.toml')
29
29
  const authPath = path.join(tempHome, '.codex', 'auth.json')
@@ -40,7 +40,7 @@ describe('writeCodexConfig', () => {
40
40
  }
41
41
 
42
42
  expect(result.configPath).toBe(configPath)
43
- expect(config.model_auto_compact_token_limit).toBe(131072)
43
+ expect(config.model_auto_compact_token_limit).toBe(159744)
44
44
  expect(config.model_providers.jw.experimental_bearer_token).toBe(
45
45
  'test-api-key'
46
46
  )
@@ -95,7 +95,7 @@ custom_model = "keep-me"
95
95
  expect(config).not.toHaveProperty('service_tier')
96
96
  expect(config).not.toHaveProperty('model_catalog_json')
97
97
  expect(config.custom_flag).toBe(true)
98
- expect(config.model).toBe('gpt-5.6-sol')
98
+ expect(config.model).toBe('gpt-6.1-sol')
99
99
  expect(config).not.toHaveProperty('preferred_auth_method')
100
100
  expect(config.model_providers.jw.base_url).toBe(
101
101
  'https://ai.gengjiawen.com/api/openai'
@@ -134,7 +134,7 @@ base_url = "https://example.com"
134
134
  }
135
135
  }
136
136
 
137
- expect(config.model).toBe('gpt-5.6-sol')
137
+ expect(config.model).toBe('gpt-6.1-sol')
138
138
  expect(config).not.toHaveProperty('model_catalog_json')
139
139
  expect(config).not.toHaveProperty('preferred_auth_method')
140
140
  expect(config.model_providers.jw.name).toBe('jw')
@@ -166,6 +166,6 @@ base_url = "https://example.com"
166
166
  >
167
167
 
168
168
  expect(config).not.toHaveProperty('model_catalog_json')
169
- expect(config.model).toBe('gpt-5.6-sol')
169
+ expect(config.model).toBe('gpt-6.1-sol')
170
170
  })
171
171
  })
package/libs/codex.ts CHANGED
@@ -16,10 +16,10 @@ function getCodexConfigDir(): string {
16
16
 
17
17
  function getCodexConfigTomlTemplate(bearerToken: string): string {
18
18
  return `model_provider = "jw"
19
- model = "gpt-5.6-sol"
19
+ model = "gpt-6.1-sol"
20
20
  model_reasoning_effort = "high"
21
21
  plan_mode_reasoning_effort = "high"
22
- model_auto_compact_token_limit = 131072
22
+ model_auto_compact_token_limit = 159744
23
23
  disable_response_storage = true
24
24
  check_for_update_on_startup = false
25
25
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gengjiawen/os-init",
3
3
  "private": false,
4
- "version": "2.0.0",
4
+ "version": "2.1.1",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "bin": {