@ruelya/grok-build 1.0.3-rev → 1.0.3-rev.2

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
@@ -177,23 +177,21 @@ grok-build-orchestrator = true
177
177
 
178
178
  ### Prompt cache key & recap model
179
179
 
180
- #### `auto_prompt_cache_key` (per model)
180
+ #### `auto_prompt_cache_key` (absorbed)
181
181
 
182
- **Effect:** On **Responses** backends (`responses` / `openai_responses`), each main turn automatically sends a **session-stable** `prompt_cache_key`. Providers that support prompt caching can reuse KV for the stable prefix of the conversation → lower latency and cost on long sessions. **Off by default.** Chat Completions / Messages ignore this flag.
182
+ **Status:** Absorbed by official Grok Build (product 1.0.3). The per-model flag is kept for config compatibility and does **not** change the wire.
183
183
 
184
- **Config** (on a `[model.*]` entry):
184
+ **Expected behavior:** On Responses backends (`responses` / `openai_responses`), every request sends `prompt_cache_key`. If unset, it defaults to `x_grok_conv_id` (main turns: the session id). Recap and `/btw` send the **parent session id** so they share that prefix cache. Chat Completions / Messages still do not forward the field.
185
185
 
186
186
  ```toml
187
- [model.sol]
188
- api_backend = "openai_responses"
189
- auto_prompt_cache_key = true
187
+ # No longer required — Responses already send prompt_cache_key.
188
+ # [model.sol]
189
+ # auto_prompt_cache_key = true
190
190
  ```
191
191
 
192
- Keys are derived from the session (main vs recap use different derivations so caches do not collide).
193
-
194
192
  #### Recap model (`[models] recap`)
195
193
 
196
- **Effect:** Session **recap** (`/recap` and automatic return-from-away recap) can run on a **cheaper / smaller** model than the main chat model. When unset, recap follows the OAuth-preferred official built-in. When set, your override wins.
194
+ **Effect:** Session **recap** (`/recap` and automatic return-from-away recap) can run on a **cheaper / smaller** model than the main chat model. **Unset** current session model (official default). **Set** → that catalog key or model id (own endpoint / credentials when the `[model.*]` entry has them). If the override cannot be resolved, recap falls back to the session model.
197
195
 
198
196
  **Config:**
199
197
 
@@ -252,7 +250,7 @@ auto_sync_catalog = true # refresh models.dev on sync
252
250
 
253
251
  | File | Purpose |
254
252
  |------|---------|
255
- | `examples/config.api-backends.toml` | Loose backends + `auto_prompt_cache_key` |
253
+ | `examples/config.api-backends.toml` | Loose backends + `[models] recap` |
256
254
  | `examples/config.usage-pricing.toml` | Cost modes / live display |
257
255
  | `examples/prices.custom.toml` | Custom $/1M rates |
258
256
  | `examples/usage-sync.toml` | WebDAV sync |
@@ -433,23 +431,21 @@ grok-build-orchestrator = true
433
431
 
434
432
  ### Prompt cache key 与 recap 模型
435
433
 
436
- #### `auto_prompt_cache_key`(按模型)
434
+ #### `auto_prompt_cache_key`(已被官方吸收)
437
435
 
438
- **效用:** **Responses** 后端(`responses` / `openai_responses`)上,每一主轮自动发送 **会话稳定** 的 `prompt_cache_key`。支持 prompt 缓存的提供商可复用对话稳定前缀的 KV → 长会话更低延迟与费用。**默认关闭。** Chat Completions / Messages 会忽略该标志。
436
+ **状态:** 已被官方 Grok Build(product 1.0.3)吸收。按模型开关仍可写在配置里,**不再改变线上结果**。
439
437
 
440
- **配置**(写在某个 `[model.*]` 上):
438
+ **预期行为:** 在 Responses 后端(`responses` / `openai_responses`)上,每个请求都会带 `prompt_cache_key`。未显式设置时回退为 `x_grok_conv_id`(主轮即 session id)。Recap 与 `/btw` 发送 **父 session id**,以便共享该前缀缓存。Chat Completions / Messages 仍不转发该字段。
441
439
 
442
440
  ```toml
443
- [model.sol]
444
- api_backend = "openai_responses"
445
- auto_prompt_cache_key = true
441
+ # 已不必设置 — Responses 默认就会带 prompt_cache_key。
442
+ # [model.sol]
443
+ # auto_prompt_cache_key = true
446
444
  ```
447
445
 
448
- key 由会话派生(主轮与 recap 使用不同派生,避免缓存互相污染)。
449
-
450
446
  #### Recap 模型(`[models] recap`)
451
447
 
452
- **效用:** 会话 **recap**(`/recap` 与离开再回时的自动 recap)可以跑在比主对话 **更便宜/更小** 的模型上。未设置时跟随 OAuth 偏好的官方内置;设置后以你的覆盖为准。
448
+ **效用:** 会话 **recap**(`/recap` 与离开再回时的自动 recap)可以跑在比主对话 **更便宜/更小** 的模型上。**未设置** 当前会话模型(与官方一致)。**设置** → 该目录键或模型 id(`[model.*]` 上的 endpoint / 凭据会一并使用)。覆盖无法解析时回退到会话模型。
453
449
 
454
450
  **配置:**
455
451
 
@@ -508,7 +504,7 @@ auto_sync_catalog = true # 同步时刷新 models.dev
508
504
 
509
505
  | 文件 | 用途 |
510
506
  |------|------|
511
- | `examples/config.api-backends.toml` | 宽松 backend + `auto_prompt_cache_key` |
507
+ | `examples/config.api-backends.toml` | 宽松 backend + `[models] recap` |
512
508
  | `examples/config.usage-pricing.toml` | 计费模式 / 实时显示 |
513
509
  | `examples/prices.custom.toml` | 自定义 $/1M |
514
510
  | `examples/usage-sync.toml` | WebDAV 同步 |
@@ -1,2 +1,2 @@
1
- version=1.0.3-rev
2
- release=https://github.com/Ruelya/grok-build-rev/releases/download/v1.0.3-rev
1
+ version=1.0.3-rev.2
2
+ release=https://github.com/Ruelya/grok-build-rev/releases/download/v1.0.3-rev.2
@@ -48,16 +48,15 @@
48
48
  #
49
49
  # [model."proxy"]
50
50
  # api_backend = "openai_responses"
51
- # auto_prompt_cache_key = true
52
51
  #
53
- # --- Prompt cache key (opt-in; Responses family only) -------------------------
52
+ # --- Prompt cache key (absorbed by official; Responses always send it) --------
54
53
  # [model."your-model-id"]
55
- # # auto_prompt_cache_key = true
54
+ # # auto_prompt_cache_key = true # no-op; kept for config compatibility
56
55
  #
57
56
  # --- Recap model (optional) ---------------------------------------------------
58
- # Override > OAuth official default > current session model
57
+ # Unset = current session model. Set = catalog key / model id.
59
58
  # [models]
60
- # # recap = "grok-4.5"
59
+ # # recap = "cheap-summary"
61
60
  #
62
61
  # <<< fork-fork-config-notes
63
62
  # =============================================================================
@@ -2,7 +2,7 @@
2
2
  # Grok Build — config_example.toml
3
3
  # Copy fields you need into: %USERPROFILE%\.grok\config.toml (or $GROK_HOME)
4
4
  # All keys are optional unless noted. Comments document accepted values.
5
- # Fork extras (openai_responses, toolset.style, auto_prompt_cache_key, recap)
5
+ # Fork extras (openai_responses, toolset.style, recap model)
6
6
  # are marked # [fork]
7
7
  # =============================================================================
8
8
 
@@ -92,7 +92,7 @@ combine_queued_prompts = false
92
92
  [models]
93
93
  default = "grok-4.5"
94
94
  default_reasoning_effort = "high" # none | low | medium | high | …
95
- # recap = "grok-4.5" # [fork] dedicated /recap model
95
+ # recap = "cheap-summary" # [fork] /recap model; unset = session model
96
96
  # web_search = "…"
97
97
  # session_summary = "…"
98
98
  # image_description = "…"
@@ -129,7 +129,7 @@ default_reasoning_effort = "high" # none | low | medium | high | …
129
129
  # "openai_chat_completions" | "openai_responses" | "anthropic_messages"
130
130
  # See docs/api-backends.md · examples/config.api-backends.toml
131
131
  # api_backend = "openai_responses"
132
- # auto_prompt_cache_key = true # [fork] main-turn pck (Responses family only)
132
+ # auto_prompt_cache_key = true # absorbed: Responses already send pck; no-op
133
133
  # temperature = 1.0
134
134
  # top_p = 1.0
135
135
  # max_completion_tokens = 16384
@@ -163,7 +163,6 @@ default_reasoning_effort = "high" # none | low | medium | high | …
163
163
  # base_url = "https://your-gateway/v1"
164
164
  # api_key = "…"
165
165
  # api_backend = "openai_responses" # [fork] loose Responses parse
166
- # auto_prompt_cache_key = true
167
166
  # context_window = 200000
168
167
  # reasoning_effort = "high"
169
168
  #
@@ -19,7 +19,6 @@ base_url = "https://your-gateway/v1"
19
19
  # api_key = "…"
20
20
  # env_key = "OPENAI_API_KEY"
21
21
  api_backend = "openai_responses"
22
- auto_prompt_cache_key = true
23
22
  context_window = 200000
24
23
  reasoning_effort = "high"
25
24
 
@@ -60,6 +59,7 @@ anthropic-version = "2023-06-01"
60
59
  # env_key = "OPENAI_API_KEY"
61
60
  # api_backend = "chat_completions"
62
61
 
63
- # Optional catalog default for picker:
62
+ # Optional catalog default + cheaper recap model:
64
63
  # [models]
65
64
  # default = "sol"
65
+ # recap = "cheap-chat"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruelya/grok-build",
3
- "version": "1.0.3-rev",
3
+ "version": "1.0.3-rev.2",
4
4
  "description": "Grok Build fork. Product version tracks upstream (currently 1.0.3-rev). Thin installer downloads from GitHub Releases.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -48,5 +48,5 @@
48
48
  "access": "public",
49
49
  "registry": "https://registry.npmjs.org/"
50
50
  },
51
- "forkReleaseBase": "https://github.com/Ruelya/grok-build-rev/releases/download/v1.0.3-rev"
51
+ "forkReleaseBase": "https://github.com/Ruelya/grok-build-rev/releases/download/v1.0.3-rev.2"
52
52
  }