chutes-build 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -6,6 +6,100 @@ project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ### Fixed
10
+
11
+ - **Only streaming requests could survive a busy model.** The Chutes fallback
12
+ chain — selected model, then `CHUTES_FALLBACK_MODELS`, then `model-router` —
13
+ was wired into `chat_completion_stream` and never into `chat_completion`. The
14
+ two paths had diverged by omission rather than by any decision, so an
15
+ interactive turn recovered quietly from `429 Infrastructure is at maximum
16
+ capacity` while compaction, title generation and the advisor surfaced it raw.
17
+ Both paths now share one chain and one policy. Nothing on the non-streaming
18
+ path can be mid-stream, so the "never switch models once bytes have shipped"
19
+ rule is satisfied trivially there.
20
+ - The chain's ordering is now testable without touching process-wide
21
+ environment variables, which no test could do safely while the rest of the
22
+ suite runs in parallel — the env reads moved to a wrapper around a pure core.
23
+ - **`CHUTES_BUILD_OAUTH2_PRINCIPAL_TYPE=Team` could never complete a flow.**
24
+ `default_team_oauth2_scopes()` was still upstream's — `grok-cli:access`,
25
+ `api:access`, `team:read`, `conversations:*`, `workspaces:*`. The user-facing
26
+ list was corrected during the re-base cleanup and this one was missed.
27
+ `api.chutes.ai` advertises no team principal at all: its `scopes_supported` is
28
+ entirely user-level, so an authorization server was being asked for scopes it
29
+ has never heard of. The default is now the user list; a deployment that really
30
+ does define a team principal says so through `CHUTES_BUILD_OAUTH2_SCOPES`.
31
+ Established by reading the IdP's own discovery document rather than the prose
32
+ documentation, which does not cover team principals either way.
33
+
34
+ ### Documentation
35
+
36
+ - `docs/upstream-sync.md` records the pending port measured rather than
37
+ estimated: 3 commits, 238 files, of which 147 overlap work of ours and 91 do
38
+ not. It also records that `git diff HEAD upstream/main` is the wrong
39
+ instrument — it reports 1424 files, because the fork is not a descendant of
40
+ upstream and the diff is mostly our own re-base read backwards.
41
+ - `AGENTS.md` records that `xai-grok-pager --lib` reports seven failures when
42
+ run from a VS Code terminal, and that they are the terminal rather than the
43
+ code: `default_actions()` reads the process environment, so Quit binds to
44
+ Ctrl+D there and the `ctrl_q` tests fail against a correct app.
45
+
46
+ ## [1.0.3] - 2026-08-11
47
+
48
+ Measured against the live Chutes endpoint with a real key, not reasoned about from
49
+ the source. Two of the findings below contradicted what the code looked like it
50
+ did, and one contradicted an earlier fix in this same release.
51
+
52
+ ### Fixed
53
+
54
+ - **Every model claimed a 256,000-token context.** The catalogue at
55
+ `llm.chutes.ai/v1/models` publishes `context_length` per model;
56
+ `parse_remote_model_value` looked for `contextWindow`, `context_window` and two
57
+ `_meta` spellings, none of which Chutes sends, so all thirteen fell through to
58
+ one default. It was wrong in both directions at once: `Qwen3-32B` holds 40,960,
59
+ so the product promised six times what exists and its requests were refused;
60
+ `DeepSeek-V4-Flash`, `Kimi-K3` and `GLM-5.2` hold 1,048,576, so three quarters
61
+ of the window went unused. Compaction and truncation were sizing themselves
62
+ against a figure no model agreed with. Eleven of thirteen now carry their
63
+ published value; the two that publish nothing keep a default.
64
+ - **Each model now carries its own output limit**, from `max_output_length` —
65
+ but only where that is *smaller* than the window. Several models publish the
66
+ two as the same number, which means "output may use the whole context" rather
67
+ than "always ask for this much": sending it as `max_tokens` leaves no room for
68
+ the prompt, and `Qwen3-32B` answers `400 Requested token count exceeds`. Nine
69
+ models gain a real cap, two are skipped. This was caught by testing the fix
70
+ against the endpoint before shipping it — the first version of the change would
71
+ have broken a model that previously worked.
72
+ - **An endpoint override reached inference but not the catalogue.**
73
+ `docs/configuration.md` documents `CHUTES_ROUTER_BASE_URL`,
74
+ `CHUTES_INFERENCE_BASE_URL` and `CHUTES_MODELS_BASE_URL`, and
75
+ `chutes-build-core` honours them, but the re-base left the agent's
76
+ `EndpointsConfig` reading only the `CHUTES_BUILD_*` spellings. The documented
77
+ names come first now, with the others kept as fallbacks.
78
+ - **The system prompt introduced the agent as xAI's.** The re-base overwrote
79
+ `templates/prompt.md` with upstream's, so every model was told at every turn
80
+ that it was "released by xAI" instead of "a privacy-first coding agent
81
+ optimized for the Chutes ecosystem" — the branding fix in 1.0.1 covered what
82
+ the user could see, not what the model was told. The same overwrite deleted
83
+ the `<official_chutes_sources>` block, which is the larger loss: it is what
84
+ directed the model to treat `chutes.ai/docs` and `chutes.ai/news` as the
85
+ primary authority on Chutes products, APIs, models, pricing and quotas, to
86
+ say when a claim is unverified rather than blending fact with inference, and
87
+ — a security instruction, not a stylistic one — never to put API keys,
88
+ credentials, private code or repository contents into a search query or
89
+ outbound request. Both restored from 0.4.3 and the encrypted templates
90
+ regenerated. Present in the 1.0.3 binaries; this entry was written after the
91
+ build was dispatched, so the 1.0.3 tag does not carry it.
92
+
93
+ ### Notes on tool compatibility
94
+
95
+ The catalogue's `supported_features` is accurate: every model advertising `tools`
96
+ emits a real `tool_calls` finish, and the two advertising nothing do not. A first
97
+ probe suggested three Qwen models were broken — they were not. The probe gave them
98
+ 96 output tokens, which a reasoning model spends thinking before it can emit the
99
+ call. That is the finding worth keeping: **a thinking model needs output budget
100
+ before tool use works at all**, and without it the failure is silent and looks like
101
+ missing support.
102
+
9
103
  ## [1.0.2] - 2026-08-11
10
104
 
11
105
  Three faults a user meets in the first minute. All reproduced against the live
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chutes-build",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Privacy-first, open-source coding agent for the Chutes ecosystem",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Michael Gasperini (Mikesoft)",
@@ -37,12 +37,12 @@
37
37
  "check": "npm test && npm run verify:release && npm pack --dry-run"
38
38
  },
39
39
  "optionalDependencies": {
40
- "chutes-build-darwin-arm64": "1.0.2",
41
- "chutes-build-darwin-x64": "1.0.2",
42
- "chutes-build-linux-arm64-gnu": "1.0.2",
43
- "chutes-build-linux-x64-gnu": "1.0.2",
44
- "chutes-build-win32-arm64": "1.0.2",
45
- "chutes-build-win32-x64": "1.0.2"
40
+ "chutes-build-darwin-arm64": "1.0.3",
41
+ "chutes-build-darwin-x64": "1.0.3",
42
+ "chutes-build-linux-arm64-gnu": "1.0.3",
43
+ "chutes-build-linux-x64-gnu": "1.0.3",
44
+ "chutes-build-win32-arm64": "1.0.3",
45
+ "chutes-build-win32-x64": "1.0.3"
46
46
  },
47
47
  "keywords": [
48
48
  "ai",