Skip to content

Commit a2ceac0

Browse files
feat: update default model to 'glm-5.1' and remove obsolete Z.AI model entries
1 parent ee05eb8 commit a2ceac0

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ Versioning: [Semantic Versioning](https://semver.org/).
66

77
For releases before v1.3.35, see [GitHub Releases](https://github.com/VladoIvankovic/Codeep/releases).
88

9+
## [1.3.42] — 2026-05-12
10+
11+
### Fixed
12+
- **Default model `glm-4.7` did not exist in the Z.AI catalogue.**
13+
`src/config/index.ts` shipped with `model: 'glm-4.7'` as the
14+
cold-start default for the `z.ai` provider, but `src/config/providers.ts`
15+
only advertises `glm-5.1`, `glm-5-turbo`, and `glm-5`. Fresh installs
16+
therefore booted with a model id that wasn't in any picker — the
17+
first send had to be preceded by a manual model switch, and any
18+
client (Mac / iOS / web dashboard) reading the config saw an unknown
19+
model. Default is now `glm-5.1`, matching what `providers.ts` lists
20+
as the Z.AI default.
21+
- `config.test.ts` updated to the new default so the validation
22+
test stays in sync.
23+
24+
### Removed
25+
- **Obsolete Z.AI model entries in `tokenTracker.ts`.** Pricing and
26+
context-window rows for `glm-4.7-flash` and `glm-4.5-air` were
27+
never reachable through the provider catalogue (`providers.ts`
28+
retired both during the GLM-5 rebrand). They only produced phantom
29+
cost estimates if a user typed those ids in by hand. Dropping them
30+
keeps the tracker's tables in lockstep with the canonical provider
31+
list.
32+
933
## [1.3.41] — 2026-05-10
1034

1135
### Fixed

src/config/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('config utilities', () => {
9494
const defaults = {
9595
apiKey: '',
9696
provider: 'z.ai',
97-
model: 'glm-4.7',
97+
model: 'glm-5.1',
9898
protocol: 'openai',
9999
plan: 'lite',
100100
language: 'en',

src/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function createConfig(): Conf<ConfigSchema> {
228228
const defaults: ConfigSchema = {
229229
apiKey: '',
230230
provider: 'z.ai',
231-
model: 'glm-4.7',
231+
model: 'glm-5.1',
232232
agentMode: 'on',
233233
ollamaUrl: 'http://localhost:11434',
234234
agentConfirmation: 'dangerous',

src/utils/tokenTracker.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ const MODEL_CONTEXT_WINDOWS: Record<string, number> = {
3232
'glm-5.1': 131_072,
3333
'glm-5': 80_000,
3434
'glm-5-turbo': 202_752,
35-
'glm-4.5-air': 131_072,
36-
'glm-4.7-flash': 202_752,
3735
// OpenAI
3836
'gpt-5.5': 1_200_000,
3937
'gpt-5.4': 1_050_000,
@@ -86,8 +84,6 @@ const MODEL_PRICING: Record<string, { inputPer1M: number; outputPer1M: number }>
8684
'glm-5.1': { inputPer1M: 1.00, outputPer1M: 3.20 },
8785
'glm-5': { inputPer1M: 0.72, outputPer1M: 2.30 },
8886
'glm-5-turbo': { inputPer1M: 1.20, outputPer1M: 4.00 },
89-
'glm-4.5-air': { inputPer1M: 0.20, outputPer1M: 1.10 },
90-
'glm-4.7-flash': { inputPer1M: 0.06, outputPer1M: 0.40 },
9187
// OpenAI
9288
'gpt-5.5': { inputPer1M: 5.00, outputPer1M: 30.00 },
9389
'gpt-5.4': { inputPer1M: 2.50, outputPer1M: 15.00 },

0 commit comments

Comments
 (0)