chore(deps): bump electron to 40.10.5#1835
Conversation
📝 WalkthroughWalkthroughPins the Electron dev dependency to ChangesDependency and Agent Version Bumps
Model DB Provider Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@resources/model-db/providers.json`:
- Around line 231355-231362: The model entry for tts-1-hd-1106 is advertising
the wrong modality metadata, causing it to be treated as audio-input-only.
Update the modality definition in the providers data so this model is marked as
text input with audio output, matching its actual behavior. Use the
tts-1-hd-1106 record in the providers.json model list to locate and correct the
modalities field.
- Around line 107793-107797: Update the pricing entry in the providers data so
the cache-write field matches the model-specific rule: for MoonshotAI Kimi,
remove cache_write entirely, and for GLM-5.2 set cache_write to the same value
as the input rate instead of zero. Adjust the affected cost object in
providers.json so usageStats does not treat cache writes as free.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5711ef28-170b-49d2-b9d9-1c56b17e4df5
📒 Files selected for processing (3)
package.jsonresources/acp-registry/registry.jsonresources/model-db/providers.json
| "cost": { | ||
| "input": 0.75, | ||
| "output": 3.5, | ||
| "cache_read": 0.2, | ||
| "cache_write": 0 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
What are the official cache write/input caching prices for MoonshotAI Kimi K2.7 Code, MoonshotAI Kimi K2.6 Fast, and Z.ai GLM-5.2? Specifically, do these APIs bill cache writes at $0 or at the normal input rate?
💡 Result:
As of June 29, 2026, the billing for these models is as follows: MoonshotAI Kimi Models (K2.6 and K2.7 Code) MoonshotAI utilizes an implicit, automatic context caching mechanism rather than an explicit "cache write" API [1]. Consequently, there is no separate "cache write" price billed at $0 or any other rate; the cost of processing your input tokens is always covered by the standard input rate [1][2]. When the system identifies that a portion of your input (such as a system prompt or conversation history) matches a previously processed request, it applies a discounted "cache hit" or "cache read" rate to those specific tokens [3][1]. - Kimi K2.6: $0.95/1M tokens (standard input), ~$0.16/1M tokens (cache-hit/read) [3][1]. - Kimi K2.7 Code: $0.95/1M tokens (standard input), ~$0.19/1M tokens (cache-hit/read) [3][1]. Z.ai GLM-5.2 Z.ai explicitly categorizes input as either standard input, cache write, or cache read [4][5]. - Standard Input: $1.40/1M tokens [4][6][7]. - Cache Write: $1.40/1M tokens [5]. - Cache Read: $0.26/1M tokens [4][6][7]. Unlike MoonshotAI, Z.ai bills cache writes at the same rate as the standard input rate, rather than $0 [5]. The discount is applied only upon "cache read" (the reuse of previously cached tokens) [4][5]. Summary of Cache Billing - MoonshotAI Kimi: No separate "cache write" billing; standard input rate applies [1][2]. - Z.ai GLM-5.2: Cache writes are billed at the normal input rate ($1.40/1M) [5].
Citations:
- 1: https://developer.puter.com/tutorials/kimi-api-pricing/
- 2: https://ominigate.ai/en/vs/kimi-k2-6-vs-qwen3-6-plus
- 3: https://aicost.tools/llm-cost/moonshot/
- 4: https://docs.z.ai/guides/overview/pricing
- 5: https://docs.ainft.com/reference/glm-52
- 6: https://www.orcarouter.ai/models/z-ai/glm-5.2
- 7: https://www.aipricing.guru/models/z-ai-glm-5-2/
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the usage accounting logic and the relevant provider entries.
rg -n --no-heading 'cache_write|cache_read|cost|usageStats|providers.json|Kimi|GLM-5.2|tts-1-hd-1106' \
src resources/model-db scripts \
| sed -n '1,220p'Repository: ThinkInAIXYZ/deepchat
Length of output: 30919
🌐 Web query:
Official pricing documentation for MoonshotAI Kimi K2.6/K2.7 code caching and Z.ai GLM-5.2 cache_write pricing. Does MoonshotAI expose a separate cache_write fee, and if so what is it?
💡 Result:
For MoonshotAI's Kimi K2.6 and K2.7 models, prompt caching is automatic and does not involve a separate cache_write fee [1][2]. MoonshotAI does not charge for the act of writing to the cache; instead, they charge a discounted rate for cache hits (reading from the cache) compared to the standard input token rate [1]. For Z.ai GLM-5.2, technical documentation lists a specific Cache Write price alongside Cache Read pricing [3]. Summary of Pricing (per 1M tokens): MoonshotAI (Kimi K2.6 / K2.7 Code): - Input (Cache Miss): $0.95 [1][4][5] - Cache Read (Cache Hit): $0.16 (K2.6) / $0.19 (K2.7) [1][4][5] - Cache Write: No cost [2] Z.ai (GLM-5.2): - Input (Standard): $1.40 [6][3][7] - Cache Write: $1.40 [3] - Cache Read: $0.26 - $0.28 [6][3][7] - Output: $4.40 [6][3][7] Notes: 1. MoonshotAI's caching is implicit and automatic [1][2]. Users should manage their "prompt_cache_key" to ensure consistent routing to the same cache clusters, which maximizes hit rates [8]. 2. For Z.ai GLM-5.2, while the cache write is technically listed at the same rate as standard input, users primarily benefit from the significantly lower cache read rate for repeated context [3][7]. Documentation on Z.ai pricing often highlights the effective discount for cached input [6][7].
Citations:
- 1: https://developer.puter.com/tutorials/kimi-api-pricing/
- 2: https://blackboxai-3b9e98f8.mintlify.app/api-reference/prompt-caching
- 3: https://docs.ainft.com/reference/glm-52
- 4: https://www.requesty.ai/models/moonshot/kimi-k2.7-code
- 5: https://modelcompare.dev/models/moonshotai/kimi-k2-7-code
- 6: https://docs.z.ai/guides/overview/pricing
- 7: https://apidog.com/blog/glm-5-2-pricing/
- 8: https://forum.moonshot.ai/t/cached-tokens-drop-when-tool-has-interleaved-thinking/216
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,120p' src/main/presenter/usageStats.ts
printf '\n---\n'
sed -n '200,240p' src/main/presenter/usageStats.ts
printf '\n---\n'
python3 - <<'PY'
import json
from pathlib import Path
p = Path('resources/model-db/providers.json')
data = json.loads(p.read_text())
targets = []
for provider in data:
for model in provider.get('models', []):
cost = model.get('cost') or {}
if cost.get('cache_write') == 0:
targets.append((provider.get('name'), model.get('name'), model.get('id'), cost.get('input'), cost.get('output'), cost.get('cache_read'), cost.get('cache_write')))
for row in targets[:20]:
print(row)
print('count=', len(targets))
PYRepository: ThinkInAIXYZ/deepchat
Length of output: 4794
🏁 Script executed:
#!/bin/bash
set -euo pipefail
for range in 107785,107805 107832,107852 107922,107942; do
echo "=== $range ==="
sed -n "${range}p" resources/model-db/providers.json
doneRepository: ThinkInAIXYZ/deepchat
Length of output: 1886
Use the right cache-write pricing here. MoonshotAI Kimi models should omit cache_write entirely, while GLM-5.2 should use the input rate; 0 makes usageStats treat cache writes as free and underestimates cost.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@resources/model-db/providers.json` around lines 107793 - 107797, Update the
pricing entry in the providers data so the cache-write field matches the
model-specific rule: for MoonshotAI Kimi, remove cache_write entirely, and for
GLM-5.2 set cache_write to the same value as the input rate instead of zero.
Adjust the affected cost object in providers.json so usageStats does not treat
cache writes as free.
| "id": "tts-1-hd-1106", | ||
| "name": "tts-1-hd-1106", | ||
| "display_name": "tts-1-hd-1106", | ||
| "modalities": { | ||
| "input": [ | ||
| "audio" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Model tts-1-hd-1106 as text input with audio output.
Lines 231355-231362 currently advertise this TTS model as audio-input-only, which will misclassify it anywhere modality metadata drives model selection.
Proposed fix
"modalities": {
"input": [
- "audio"
+ "text"
+ ],
+ "output": [
+ "audio"
]
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "id": "tts-1-hd-1106", | |
| "name": "tts-1-hd-1106", | |
| "display_name": "tts-1-hd-1106", | |
| "modalities": { | |
| "input": [ | |
| "audio" | |
| ] | |
| }, | |
| "id": "tts-1-hd-1106", | |
| "name": "tts-1-hd-1106", | |
| "display_name": "tts-1-hd-1106", | |
| "modalities": { | |
| "input": [ | |
| "text" | |
| ], | |
| "output": [ | |
| "audio" | |
| ] | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@resources/model-db/providers.json` around lines 231355 - 231362, The model
entry for tts-1-hd-1106 is advertising the wrong modality metadata, causing it
to be treated as audio-input-only. Update the modality definition in the
providers data so this model is marked as text input with audio output, matching
its actual behavior. Use the tts-1-hd-1106 record in the providers.json model
list to locate and correct the modalities field.
bump electron to 40.10.5
Summary by CodeRabbit
New Features
Bug Fixes
Chores