#55 #56 docs EN+FR: Dashboard and Chat keys and commands, first_byte_ms; quality run #38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4ae74ac parent: d628c4a modified
.quality/history.jsonl +1 -0 | @@ -35,3 +35,4 @@ | ||
| 35 | 35 | {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "caefc12", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 548, "cyclo": 606, "fields": 1210, "funcs": 583, "lcom": 115, "lines": 10692, "loc": 8510}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 35, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T14:42:16Z"} |
| 36 | 36 | {"branch": "feature/v0.3-tui", "breaches": [], "commit": "cb5a310", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 262, "complex": 588, "cyclo": 649, "fields": 1364, "funcs": 667, "lcom": 124, "lines": 12110, "loc": 9587}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 36, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T21:35:08Z"} |
| 37 | 37 | {"branch": "feature/v0.3-tui", "breaches": [], "commit": "64c4687", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 326, "complex": 717, "cyclo": 827, "fields": 1651, "funcs": 818, "lcom": 154, "lines": 14427, "loc": 11386}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 37, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-27T04:12:05Z"} |
| 38 | +{"branch": "feature/v0.3-tui", "breaches": [], "commit": "d628c4a", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 343, "complex": 815, "cyclo": 943, "fields": 1789, "funcs": 892, "lcom": 163, "lines": 15636, "loc": 12375}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 38, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-27T04:37:14Z"} | |
| @@ -35,3 +35,4 @@ | |||
| 35 | {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "caefc12", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 548, "cyclo": 606, "fields": 1210, "funcs": 583, "lcom": 115, "lines": 10692, "loc": 8510}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 35, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T14:42:16Z"} | 35 | {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "caefc12", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 548, "cyclo": 606, "fields": 1210, "funcs": 583, "lcom": 115, "lines": 10692, "loc": 8510}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 35, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T14:42:16Z"} |
| 36 | {"branch": "feature/v0.3-tui", "breaches": [], "commit": "cb5a310", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 262, "complex": 588, "cyclo": 649, "fields": 1364, "funcs": 667, "lcom": 124, "lines": 12110, "loc": 9587}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 36, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T21:35:08Z"} | 36 | {"branch": "feature/v0.3-tui", "breaches": [], "commit": "cb5a310", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 262, "complex": 588, "cyclo": 649, "fields": 1364, "funcs": 667, "lcom": 124, "lines": 12110, "loc": 9587}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 36, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T21:35:08Z"} |
| 37 | {"branch": "feature/v0.3-tui", "breaches": [], "commit": "64c4687", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 326, "complex": 717, "cyclo": 827, "fields": 1651, "funcs": 818, "lcom": 154, "lines": 14427, "loc": 11386}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 37, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-27T04:12:05Z"} | 37 | {"branch": "feature/v0.3-tui", "breaches": [], "commit": "64c4687", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 326, "complex": 717, "cyclo": 827, "fields": 1651, "funcs": 818, "lcom": 154, "lines": 14427, "loc": 11386}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 37, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-27T04:12:05Z"} |
| 38 | +{"branch": "feature/v0.3-tui", "breaches": [], "commit": "d628c4a", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 343, "complex": 815, "cyclo": 943, "fields": 1789, "funcs": 892, "lcom": 163, "lines": 15636, "loc": 12375}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 38, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-27T04:37:14Z"} | ||
added
.quality/report-20261127T043714Z.md +73 -0 | new file mode 100644 | ||
| @@ -0,0 +1,73 @@ | ||
| 1 | +# Quality report — 2026-11-27T04:37:14Z | |
| 2 | + | |
| 3 | +- **Gate**: ✅ **PASS** | |
| 4 | +- **Commit**: `d628c4a` on `feature/v0.3-tui` | |
| 5 | +- **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20) | |
| 6 | +- **swiftlint**: 0.65.1 (run directly, merged into lint issues) | |
| 7 | +- **Run**: #38 (previous: 2026-11-27T04:12:05Z) | |
| 8 | + | |
| 9 | +## Lint issues (`qlty check`) | |
| 10 | + | |
| 11 | +_none_ | |
| 12 | + | |
| 13 | +### Top rules | |
| 14 | + | |
| 15 | +_none_ | |
| 16 | + | |
| 17 | +### Most affected files | |
| 18 | + | |
| 19 | +_none_ | |
| 20 | + | |
| 21 | +## Code smells (`qlty smells`) | |
| 22 | + | |
| 23 | +Total: **0** (vs previous: ±0) | |
| 24 | + | |
| 25 | +_none_ | |
| 26 | + | |
| 27 | +## Metrics (`qlty metrics`) | |
| 28 | + | |
| 29 | +| metric | total | vs previous | | |
| 30 | +|---|---|---| | |
| 31 | +| funcs | 892 | +74 | | |
| 32 | +| classes | 343 | +17 | | |
| 33 | +| fields | 1789 | +138 | | |
| 34 | +| cyclo | 943 | +116 | | |
| 35 | +| complex | 815 | +98 | | |
| 36 | +| lcom | 163 | +9 | | |
| 37 | +| lines | 15636 | +1209 | | |
| 38 | +| loc | 12375 | +989 | | |
| 39 | + | |
| 40 | +### Most complex files | |
| 41 | + | |
| 42 | +| file | complex | cyclo | loc | | |
| 43 | +|---|---|---|---| | |
| 44 | +| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 244 | | |
| 45 | +| Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 | | |
| 46 | +| Sources/RazorbillTUI/ChatScreen.swift | 27 | 37 | 212 | | |
| 47 | +| experiments/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 | | |
| 48 | +| Sources/RazorbillServer/ModelManager.swift | 25 | 26 | 268 | | |
| 49 | +| Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 | | |
| 50 | +| Sources/RazorbillTUI/ServerAPI.swift | 23 | 23 | 134 | | |
| 51 | +| tools/host-runner/host_runner.py | 23 | 23 | 144 | | |
| 52 | +| Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 | | |
| 53 | +| Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 | | |
| 54 | +| Sources/RazorbillTUI/Terminal.swift | 20 | 10 | 99 | | |
| 55 | +| Sources/RazorbillTUI/DashboardScreen.swift | 19 | 17 | 109 | | |
| 56 | +| Sources/RazorbillTUI/TUIApp.swift | 19 | 31 | 204 | | |
| 57 | +| Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 | | |
| 58 | +| Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 | | |
| 59 | + | |
| 60 | +## Trend | |
| 61 | + | |
| 62 | +| run | timestamp | error | warning | smells | complex | gate | | |
| 63 | +|---|---|---|---|---|---|---| | |
| 64 | +| 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS | | |
| 65 | +| 30 | 2026-11-26T05:21:18Z | 0 | 0 | 0 | 546 | PASS | | |
| 66 | +| 31 | 2026-11-26T07:11:39Z | 0 | 0 | 0 | 546 | PASS | | |
| 67 | +| 32 | 2026-11-26T07:29:39Z | 0 | 0 | 0 | 547 | PASS | | |
| 68 | +| 33 | 2026-11-26T14:05:13Z | 0 | 0 | 0 | 547 | PASS | | |
| 69 | +| 34 | 2026-11-26T14:17:19Z | 0 | 0 | 0 | 547 | PASS | | |
| 70 | +| 35 | 2026-11-26T14:42:16Z | 0 | 0 | 0 | 548 | PASS | | |
| 71 | +| 36 | 2026-11-26T21:35:08Z | 0 | 0 | 0 | 588 | PASS | | |
| 72 | +| 37 | 2026-11-27T04:12:05Z | 0 | 0 | 0 | 717 | PASS | | |
| 73 | +| 38 | 2026-11-27T04:37:14Z | 0 | 0 | 0 | 815 | PASS | | |
| new file mode 100644 | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | +# Quality report — 2026-11-27T04:37:14Z | ||
| 2 | + | ||
| 3 | +- **Gate**: ✅ **PASS** | ||
| 4 | +- **Commit**: `d628c4a` on `feature/v0.3-tui` | ||
| 5 | +- **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20) | ||
| 6 | +- **swiftlint**: 0.65.1 (run directly, merged into lint issues) | ||
| 7 | +- **Run**: #38 (previous: 2026-11-27T04:12:05Z) | ||
| 8 | + | ||
| 9 | +## Lint issues (`qlty check`) | ||
| 10 | + | ||
| 11 | +_none_ | ||
| 12 | + | ||
| 13 | +### Top rules | ||
| 14 | + | ||
| 15 | +_none_ | ||
| 16 | + | ||
| 17 | +### Most affected files | ||
| 18 | + | ||
| 19 | +_none_ | ||
| 20 | + | ||
| 21 | +## Code smells (`qlty smells`) | ||
| 22 | + | ||
| 23 | +Total: **0** (vs previous: ±0) | ||
| 24 | + | ||
| 25 | +_none_ | ||
| 26 | + | ||
| 27 | +## Metrics (`qlty metrics`) | ||
| 28 | + | ||
| 29 | +| metric | total | vs previous | | ||
| 30 | +|---|---|---| | ||
| 31 | +| funcs | 892 | +74 | | ||
| 32 | +| classes | 343 | +17 | | ||
| 33 | +| fields | 1789 | +138 | | ||
| 34 | +| cyclo | 943 | +116 | | ||
| 35 | +| complex | 815 | +98 | | ||
| 36 | +| lcom | 163 | +9 | | ||
| 37 | +| lines | 15636 | +1209 | | ||
| 38 | +| loc | 12375 | +989 | | ||
| 39 | + | ||
| 40 | +### Most complex files | ||
| 41 | + | ||
| 42 | +| file | complex | cyclo | loc | | ||
| 43 | +|---|---|---|---| | ||
| 44 | +| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 244 | | ||
| 45 | +| Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 | | ||
| 46 | +| Sources/RazorbillTUI/ChatScreen.swift | 27 | 37 | 212 | | ||
| 47 | +| experiments/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 | | ||
| 48 | +| Sources/RazorbillServer/ModelManager.swift | 25 | 26 | 268 | | ||
| 49 | +| Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 | | ||
| 50 | +| Sources/RazorbillTUI/ServerAPI.swift | 23 | 23 | 134 | | ||
| 51 | +| tools/host-runner/host_runner.py | 23 | 23 | 144 | | ||
| 52 | +| Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 | | ||
| 53 | +| Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 | | ||
| 54 | +| Sources/RazorbillTUI/Terminal.swift | 20 | 10 | 99 | | ||
| 55 | +| Sources/RazorbillTUI/DashboardScreen.swift | 19 | 17 | 109 | | ||
| 56 | +| Sources/RazorbillTUI/TUIApp.swift | 19 | 31 | 204 | | ||
| 57 | +| Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 | | ||
| 58 | +| Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 | | ||
| 59 | + | ||
| 60 | +## Trend | ||
| 61 | + | ||
| 62 | +| run | timestamp | error | warning | smells | complex | gate | | ||
| 63 | +|---|---|---|---|---|---|---| | ||
| 64 | +| 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS | | ||
| 65 | +| 30 | 2026-11-26T05:21:18Z | 0 | 0 | 0 | 546 | PASS | | ||
| 66 | +| 31 | 2026-11-26T07:11:39Z | 0 | 0 | 0 | 546 | PASS | | ||
| 67 | +| 32 | 2026-11-26T07:29:39Z | 0 | 0 | 0 | 547 | PASS | | ||
| 68 | +| 33 | 2026-11-26T14:05:13Z | 0 | 0 | 0 | 547 | PASS | | ||
| 69 | +| 34 | 2026-11-26T14:17:19Z | 0 | 0 | 0 | 547 | PASS | | ||
| 70 | +| 35 | 2026-11-26T14:42:16Z | 0 | 0 | 0 | 548 | PASS | | ||
| 71 | +| 36 | 2026-11-26T21:35:08Z | 0 | 0 | 0 | 588 | PASS | | ||
| 72 | +| 37 | 2026-11-27T04:12:05Z | 0 | 0 | 0 | 717 | PASS | | ||
| 73 | +| 38 | 2026-11-27T04:37:14Z | 0 | 0 | 0 | 815 | PASS | | ||
modified
.quality/report-latest.md +17 -17 | @@ -1,10 +1,10 @@ | ||
| 1 | -# Quality report — 2026-11-27T04:12:05Z | |
| 1 | +# Quality report — 2026-11-27T04:37:14Z | |
| 2 | 2 | |
| 3 | 3 | - **Gate**: ✅ **PASS** |
| 4 | -- **Commit**: `64c4687` on `feature/v0.3-tui` | |
| 4 | +- **Commit**: `d628c4a` on `feature/v0.3-tui` | |
| 5 | 5 | - **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20) |
| 6 | 6 | - **swiftlint**: 0.65.1 (run directly, merged into lint issues) |
| 7 | -- **Run**: #37 (previous: 2026-11-26T21:35:08Z) | |
| 7 | +- **Run**: #38 (previous: 2026-11-27T04:12:05Z) | |
| 8 | 8 | |
| 9 | 9 | ## Lint issues (`qlty check`) |
| 10 | 10 | |
| @@ -28,40 +28,39 @@ _none_ | ||
| 28 | 28 | |
| 29 | 29 | | metric | total | vs previous | |
| 30 | 30 | |---|---|---| |
| 31 | -| funcs | 818 | +151 | | |
| 32 | -| classes | 326 | +64 | | |
| 33 | -| fields | 1651 | +287 | | |
| 34 | -| cyclo | 827 | +178 | | |
| 35 | -| complex | 717 | +129 | | |
| 36 | -| lcom | 154 | +30 | | |
| 37 | -| lines | 14427 | +2317 | | |
| 38 | -| loc | 11386 | +1799 | | |
| 31 | +| funcs | 892 | +74 | | |
| 32 | +| classes | 343 | +17 | | |
| 33 | +| fields | 1789 | +138 | | |
| 34 | +| cyclo | 943 | +116 | | |
| 35 | +| complex | 815 | +98 | | |
| 36 | +| lcom | 163 | +9 | | |
| 37 | +| lines | 15636 | +1209 | | |
| 38 | +| loc | 12375 | +989 | | |
| 39 | 39 | |
| 40 | 40 | ### Most complex files |
| 41 | 41 | |
| 42 | 42 | | file | complex | cyclo | loc | |
| 43 | 43 | |---|---|---|---| |
| 44 | -| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 242 | | |
| 44 | +| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 244 | | |
| 45 | 45 | | Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 | |
| 46 | +| Sources/RazorbillTUI/ChatScreen.swift | 27 | 37 | 212 | | |
| 46 | 47 | | experiments/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 | |
| 47 | 48 | | Sources/RazorbillServer/ModelManager.swift | 25 | 26 | 268 | |
| 48 | 49 | | Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 | |
| 50 | +| Sources/RazorbillTUI/ServerAPI.swift | 23 | 23 | 134 | | |
| 49 | 51 | | tools/host-runner/host_runner.py | 23 | 23 | 144 | |
| 50 | 52 | | Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 | |
| 51 | 53 | | Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 | |
| 52 | 54 | | Sources/RazorbillTUI/Terminal.swift | 20 | 10 | 99 | |
| 55 | +| Sources/RazorbillTUI/DashboardScreen.swift | 19 | 17 | 109 | | |
| 56 | +| Sources/RazorbillTUI/TUIApp.swift | 19 | 31 | 204 | | |
| 53 | 57 | | Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 | |
| 54 | 58 | | Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 | |
| 55 | -| Sources/RazorbillServer/Chat/ChatCompletionChunk.swift | 16 | 11 | 137 | | |
| 56 | -| Sources/RazorbillCore/Config/OrderedJSONReader.swift | 15 | 24 | 140 | | |
| 57 | -| Sources/RazorbillCore/Config/GenerationOverrides.swift | 14 | 15 | 67 | | |
| 58 | -| Sources/RazorbillTUI/DashboardView.swift | 14 | 17 | 82 | | |
| 59 | 59 | |
| 60 | 60 | ## Trend |
| 61 | 61 | |
| 62 | 62 | | run | timestamp | error | warning | smells | complex | gate | |
| 63 | 63 | |---|---|---|---|---|---|---| |
| 64 | -| 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS | | |
| 65 | 64 | | 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS | |
| 66 | 65 | | 30 | 2026-11-26T05:21:18Z | 0 | 0 | 0 | 546 | PASS | |
| 67 | 66 | | 31 | 2026-11-26T07:11:39Z | 0 | 0 | 0 | 546 | PASS | |
| @@ -71,3 +70,4 @@ _none_ | ||
| 71 | 70 | | 35 | 2026-11-26T14:42:16Z | 0 | 0 | 0 | 548 | PASS | |
| 72 | 71 | | 36 | 2026-11-26T21:35:08Z | 0 | 0 | 0 | 588 | PASS | |
| 73 | 72 | | 37 | 2026-11-27T04:12:05Z | 0 | 0 | 0 | 717 | PASS | |
| 73 | +| 38 | 2026-11-27T04:37:14Z | 0 | 0 | 0 | 815 | PASS | | |
| @@ -1,10 +1,10 @@ | |||
| 1 | -# Quality report — 2026-11-27T04:12:05Z | 1 | +# Quality report — 2026-11-27T04:37:14Z |
| 2 | 2 | ||
| 3 | - **Gate**: ✅ **PASS** | 3 | - **Gate**: ✅ **PASS** |
| 4 | -- **Commit**: `64c4687` on `feature/v0.3-tui` | 4 | +- **Commit**: `d628c4a` on `feature/v0.3-tui` |
| 5 | - **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20) | 5 | - **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20) |
| 6 | - **swiftlint**: 0.65.1 (run directly, merged into lint issues) | 6 | - **swiftlint**: 0.65.1 (run directly, merged into lint issues) |
| 7 | -- **Run**: #37 (previous: 2026-11-26T21:35:08Z) | 7 | +- **Run**: #38 (previous: 2026-11-27T04:12:05Z) |
| 8 | 8 | ||
| 9 | ## Lint issues (`qlty check`) | 9 | ## Lint issues (`qlty check`) |
| 10 | 10 | ||
| @@ -28,40 +28,39 @@ _none_ | |||
| 28 | 28 | ||
| 29 | | metric | total | vs previous | | 29 | | metric | total | vs previous | |
| 30 | |---|---|---| | 30 | |---|---|---| |
| 31 | -| funcs | 818 | +151 | | 31 | +| funcs | 892 | +74 | |
| 32 | -| classes | 326 | +64 | | 32 | +| classes | 343 | +17 | |
| 33 | -| fields | 1651 | +287 | | 33 | +| fields | 1789 | +138 | |
| 34 | -| cyclo | 827 | +178 | | 34 | +| cyclo | 943 | +116 | |
| 35 | -| complex | 717 | +129 | | 35 | +| complex | 815 | +98 | |
| 36 | -| lcom | 154 | +30 | | 36 | +| lcom | 163 | +9 | |
| 37 | -| lines | 14427 | +2317 | | 37 | +| lines | 15636 | +1209 | |
| 38 | -| loc | 11386 | +1799 | | 38 | +| loc | 12375 | +989 | |
| 39 | 39 | ||
| 40 | ### Most complex files | 40 | ### Most complex files |
| 41 | 41 | ||
| 42 | | file | complex | cyclo | loc | | 42 | | file | complex | cyclo | loc | |
| 43 | |---|---|---|---| | 43 | |---|---|---|---| |
| 44 | -| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 242 | | 44 | +| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 244 | |
| 45 | | Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 | | 45 | | Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 | |
| 46 | +| Sources/RazorbillTUI/ChatScreen.swift | 27 | 37 | 212 | | ||
| 46 | | experiments/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 | | 47 | | experiments/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 | |
| 47 | | Sources/RazorbillServer/ModelManager.swift | 25 | 26 | 268 | | 48 | | Sources/RazorbillServer/ModelManager.swift | 25 | 26 | 268 | |
| 48 | | Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 | | 49 | | Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 | |
| 50 | +| Sources/RazorbillTUI/ServerAPI.swift | 23 | 23 | 134 | | ||
| 49 | | tools/host-runner/host_runner.py | 23 | 23 | 144 | | 51 | | tools/host-runner/host_runner.py | 23 | 23 | 144 | |
| 50 | | Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 | | 52 | | Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 | |
| 51 | | Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 | | 53 | | Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 | |
| 52 | | Sources/RazorbillTUI/Terminal.swift | 20 | 10 | 99 | | 54 | | Sources/RazorbillTUI/Terminal.swift | 20 | 10 | 99 | |
| 55 | +| Sources/RazorbillTUI/DashboardScreen.swift | 19 | 17 | 109 | | ||
| 56 | +| Sources/RazorbillTUI/TUIApp.swift | 19 | 31 | 204 | | ||
| 53 | | Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 | | 57 | | Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 | |
| 54 | | Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 | | 58 | | Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 | |
| 55 | -| Sources/RazorbillServer/Chat/ChatCompletionChunk.swift | 16 | 11 | 137 | | ||
| 56 | -| Sources/RazorbillCore/Config/OrderedJSONReader.swift | 15 | 24 | 140 | | ||
| 57 | -| Sources/RazorbillCore/Config/GenerationOverrides.swift | 14 | 15 | 67 | | ||
| 58 | -| Sources/RazorbillTUI/DashboardView.swift | 14 | 17 | 82 | | ||
| 59 | 59 | ||
| 60 | ## Trend | 60 | ## Trend |
| 61 | 61 | ||
| 62 | | run | timestamp | error | warning | smells | complex | gate | | 62 | | run | timestamp | error | warning | smells | complex | gate | |
| 63 | |---|---|---|---|---|---|---| | 63 | |---|---|---|---|---|---|---| |
| 64 | -| 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS | | ||
| 65 | | 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS | | 64 | | 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS | |
| 66 | | 30 | 2026-11-26T05:21:18Z | 0 | 0 | 0 | 546 | PASS | | 65 | | 30 | 2026-11-26T05:21:18Z | 0 | 0 | 0 | 546 | PASS | |
| 67 | | 31 | 2026-11-26T07:11:39Z | 0 | 0 | 0 | 546 | PASS | | 66 | | 31 | 2026-11-26T07:11:39Z | 0 | 0 | 0 | 546 | PASS | |
| @@ -71,3 +70,4 @@ _none_ | |||
| 71 | | 35 | 2026-11-26T14:42:16Z | 0 | 0 | 0 | 548 | PASS | | 70 | | 35 | 2026-11-26T14:42:16Z | 0 | 0 | 0 | 548 | PASS | |
| 72 | | 36 | 2026-11-26T21:35:08Z | 0 | 0 | 0 | 588 | PASS | | 71 | | 36 | 2026-11-26T21:35:08Z | 0 | 0 | 0 | 588 | PASS | |
| 73 | | 37 | 2026-11-27T04:12:05Z | 0 | 0 | 0 | 717 | PASS | | 72 | | 37 | 2026-11-27T04:12:05Z | 0 | 0 | 0 | 717 | PASS | |
| 73 | +| 38 | 2026-11-27T04:37:14Z | 0 | 0 | 0 | 815 | PASS | | ||
modified
Sources/RazorbillCLI/Commands/TUICommand.swift +3 -2 | @@ -14,8 +14,9 @@ struct TUICommand: AsyncParsableCommand { | ||
| 14 | 14 | commandName: "tui", |
| 15 | 15 | abstract: "Open the full-screen interface to the server running on this machine.", |
| 16 | 16 | discussion: """ |
| 17 | - Watches a running `rzb serve`: its models, memory and requests. Start the server \ | |
| 18 | - first, in another terminal. F1–F4 or Ctrl-T switch screens, Ctrl-Q quits. | |
| 17 | + Chats with the models of a running `rzb serve` and watches its models, memory and \ | |
| 18 | + requests. Start the server first, in another terminal. F1–F4 or Ctrl-T switch \ | |
| 19 | + screens, Ctrl-Q quits. | |
| 19 | 20 | """) |
| 20 | 21 | |
| 21 | 22 | @Option( |
| @@ -14,8 +14,9 @@ struct TUICommand: AsyncParsableCommand { | |||
| 14 | commandName: "tui", | 14 | commandName: "tui", |
| 15 | abstract: "Open the full-screen interface to the server running on this machine.", | 15 | abstract: "Open the full-screen interface to the server running on this machine.", |
| 16 | discussion: """ | 16 | discussion: """ |
| 17 | - Watches a running `rzb serve`: its models, memory and requests. Start the server \ | 17 | + Chats with the models of a running `rzb serve` and watches its models, memory and \ |
| 18 | - first, in another terminal. F1–F4 or Ctrl-T switch screens, Ctrl-Q quits. | 18 | + requests. Start the server first, in another terminal. F1–F4 or Ctrl-T switch \ |
| 19 | + screens, Ctrl-Q quits. | ||
| 19 | """) | 20 | """) |
| 20 | 21 | ||
| 21 | @Option( | 22 | @Option( |
modified
docs/en/how-to/watch-and-steer-a-running-server.md +2 -0 | @@ -18,6 +18,8 @@ curl -s -X POST http://127.0.0.1:7920/rzb/models/qwen3/unload | ||
| 18 | 18 | |
| 19 | 19 | Use the name clients use: a declared `id`, or a Hugging Face id such as `mlx-community/Qwen3-4B-4bit` (the `/` stays as is in the path). The answer says `unloaded`, or `not_loaded` when there was nothing to free. |
| 20 | 20 | |
| 21 | +In [`rzb tui`](../reference/cli.md#rzb-tui), select the model on the Dashboard and press `u`: the answer shows under the requests. | |
| 22 | + | |
| 21 | 23 | If the answer is a 409 `model_busy`, a request is generating with the model or waiting for it. Nothing was unloaded: retry once `busy` is `false` and `queued` is `0` in the status. The next request for the model loads it again. |
| 22 | 24 | |
| 23 | 25 | ## Apply a configuration change without restarting |
| @@ -18,6 +18,8 @@ curl -s -X POST http://127.0.0.1:7920/rzb/models/qwen3/unload | |||
| 18 | 18 | ||
| 19 | Use the name clients use: a declared `id`, or a Hugging Face id such as `mlx-community/Qwen3-4B-4bit` (the `/` stays as is in the path). The answer says `unloaded`, or `not_loaded` when there was nothing to free. | 19 | Use the name clients use: a declared `id`, or a Hugging Face id such as `mlx-community/Qwen3-4B-4bit` (the `/` stays as is in the path). The answer says `unloaded`, or `not_loaded` when there was nothing to free. |
| 20 | 20 | ||
| 21 | +In [`rzb tui`](../reference/cli.md#rzb-tui), select the model on the Dashboard and press `u`: the answer shows under the requests. | ||
| 22 | + | ||
| 21 | If the answer is a 409 `model_busy`, a request is generating with the model or waiting for it. Nothing was unloaded: retry once `busy` is `false` and `queued` is `0` in the status. The next request for the model loads it again. | 23 | If the answer is a 409 `model_busy`, a request is generating with the model or waiting for it. Nothing was unloaded: retry once `busy` is `false` and `queued` is `0` in the status. The next request for the model loads it again. |
| 22 | 24 | ||
| 23 | ## Apply a configuration change without restarting | 25 | ## Apply a configuration change without restarting |
modified
docs/en/reference/cli.md +30 -2 | @@ -61,9 +61,37 @@ Opens a full-screen interface to a `rzb serve` running on the same machine, and | ||
| 61 | 61 | | --- | --- | |
| 62 | 62 | | `F1` `F2` `F3` `F4` | Chat, Dashboard, Models, Settings screen | |
| 63 | 63 | | `Ctrl-T` | Next screen | |
| 64 | -| `Ctrl-Q`, `Ctrl-C` | Quit | | |
| 64 | +| `Ctrl-Q` | Quit | | |
| 65 | +| `Ctrl-C` | Stop the answer being generated on the Chat screen; quit otherwise | | |
| 65 | 66 | |
| 66 | -The first screen is the Dashboard: the server's version, uptime and address, the engine's memory, the loaded models (state, size, idle time, time left before `keep_alive` unloads them, or busy and waiting requests) and the last requests. The Chat, Models and Settings screens are not built yet. The bottom line shows the connection: `●` connected (version, model, memory), `○` no server (the screen gives the `rzb serve` command to run, with `--config` when one was given), `✕` API key refused or server on another machine. | |
| 67 | +The Models and Settings screens are not built yet. | |
| 68 | + | |
| 69 | +**Dashboard** (the first screen): the server's version, uptime and address; the engine's memory as a gauge of active over limit, with cache and peak; the loaded models (name, kind, state, size, then idle time and time left before `keep_alive` unloads them, or busy and waiting requests); the last requests (age, method and path, status, model, prompt+completion tokens, cached tokens, completion tokens per second over the whole request, duration). | |
| 70 | + | |
| 71 | +| Key | Effect | | |
| 72 | +| --- | --- | | |
| 73 | +| `↑` `↓` `PgUp` `PgDn` `Home` `End` | Select a model | | |
| 74 | +| `u` | Unload the selected model ([`POST /rzb/models/{id}/unload`](http-api.md#post-rzbmodelsidunload)); the server's answer is shown below the requests, including its refusal while the model is in use | | |
| 75 | + | |
| 76 | +**Chat**: a conversation with a model of the server, streamed. It is kept by `rzb tui` and resent whole with each message. The model is the first loaded chat model of `/v1/models`, else the first chat model listed. After each answer: prompt+completion tokens, cached prompt tokens, tokens per second from the first piece to the last. | |
| 77 | + | |
| 78 | +| Key | Effect | | |
| 79 | +| --- | --- | | |
| 80 | +| `Enter` | Send the message, or run a command | | |
| 81 | +| `Esc` | Stop the answer being generated (what came stays and is part of the conversation) | | |
| 82 | +| `Ctrl-N` | New conversation | | |
| 83 | +| `Ctrl-P` | Choose the model (`↑` `↓`, `Enter`; `Esc` closes the list) | | |
| 84 | +| `Ctrl-R` | Reasoning folded (one line with its length), hidden, then shown | | |
| 85 | +| `PgUp` `PgDn` | Scroll the conversation | | |
| 86 | +| `←` `→` `Home` `End` `Ctrl-A` `Ctrl-E` `Backspace` `Delete` | Edit the message | | |
| 87 | + | |
| 88 | +| Command | Effect | | |
| 89 | +| --- | --- | | |
| 90 | +| `/set <name> <value>` | Sampling for the next messages: `temperature` (0–2), `top_p` (0–1), `top_k` (≥ 0), `min_p` (0–1), `max_tokens` (≥ 1), `thinking` (`on`, `off`) | | |
| 91 | +| `/set <name>` | Give the setting back to the server's value | | |
| 92 | +| `/set` | Show the settings | | |
| 93 | +| `/clear` | New conversation | | |
| 94 | +| `/help` | The keys and commands | The bottom line shows the connection: `●` connected (version, model, memory), `○` no server (the screen gives the `rzb serve` command to run, with `--config` when one was given), `✕` API key refused or server on another machine. | |
| 67 | 95 | |
| 68 | 96 | Errors: a `--url` that is not an http(s) address gives exit code 64; an invalid `--config` file, exit code 2; no terminal on standard input and output, `error: rzb tui needs a terminal …` and exit code 1. |
| 69 | 97 | |
| @@ -61,9 +61,37 @@ Opens a full-screen interface to a `rzb serve` running on the same machine, and | |||
| 61 | | --- | --- | | 61 | | --- | --- | |
| 62 | | `F1` `F2` `F3` `F4` | Chat, Dashboard, Models, Settings screen | | 62 | | `F1` `F2` `F3` `F4` | Chat, Dashboard, Models, Settings screen | |
| 63 | | `Ctrl-T` | Next screen | | 63 | | `Ctrl-T` | Next screen | |
| 64 | -| `Ctrl-Q`, `Ctrl-C` | Quit | | 64 | +| `Ctrl-Q` | Quit | |
| 65 | +| `Ctrl-C` | Stop the answer being generated on the Chat screen; quit otherwise | | ||
| 65 | 66 | ||
| 66 | -The first screen is the Dashboard: the server's version, uptime and address, the engine's memory, the loaded models (state, size, idle time, time left before `keep_alive` unloads them, or busy and waiting requests) and the last requests. The Chat, Models and Settings screens are not built yet. The bottom line shows the connection: `●` connected (version, model, memory), `○` no server (the screen gives the `rzb serve` command to run, with `--config` when one was given), `✕` API key refused or server on another machine. | 67 | +The Models and Settings screens are not built yet. |
| 68 | + | ||
| 69 | +**Dashboard** (the first screen): the server's version, uptime and address; the engine's memory as a gauge of active over limit, with cache and peak; the loaded models (name, kind, state, size, then idle time and time left before `keep_alive` unloads them, or busy and waiting requests); the last requests (age, method and path, status, model, prompt+completion tokens, cached tokens, completion tokens per second over the whole request, duration). | ||
| 70 | + | ||
| 71 | +| Key | Effect | | ||
| 72 | +| --- | --- | | ||
| 73 | +| `↑` `↓` `PgUp` `PgDn` `Home` `End` | Select a model | | ||
| 74 | +| `u` | Unload the selected model ([`POST /rzb/models/{id}/unload`](http-api.md#post-rzbmodelsidunload)); the server's answer is shown below the requests, including its refusal while the model is in use | | ||
| 75 | + | ||
| 76 | +**Chat**: a conversation with a model of the server, streamed. It is kept by `rzb tui` and resent whole with each message. The model is the first loaded chat model of `/v1/models`, else the first chat model listed. After each answer: prompt+completion tokens, cached prompt tokens, tokens per second from the first piece to the last. | ||
| 77 | + | ||
| 78 | +| Key | Effect | | ||
| 79 | +| --- | --- | | ||
| 80 | +| `Enter` | Send the message, or run a command | | ||
| 81 | +| `Esc` | Stop the answer being generated (what came stays and is part of the conversation) | | ||
| 82 | +| `Ctrl-N` | New conversation | | ||
| 83 | +| `Ctrl-P` | Choose the model (`↑` `↓`, `Enter`; `Esc` closes the list) | | ||
| 84 | +| `Ctrl-R` | Reasoning folded (one line with its length), hidden, then shown | | ||
| 85 | +| `PgUp` `PgDn` | Scroll the conversation | | ||
| 86 | +| `←` `→` `Home` `End` `Ctrl-A` `Ctrl-E` `Backspace` `Delete` | Edit the message | | ||
| 87 | + | ||
| 88 | +| Command | Effect | | ||
| 89 | +| --- | --- | | ||
| 90 | +| `/set <name> <value>` | Sampling for the next messages: `temperature` (0–2), `top_p` (0–1), `top_k` (≥ 0), `min_p` (0–1), `max_tokens` (≥ 1), `thinking` (`on`, `off`) | | ||
| 91 | +| `/set <name>` | Give the setting back to the server's value | | ||
| 92 | +| `/set` | Show the settings | | ||
| 93 | +| `/clear` | New conversation | | ||
| 94 | +| `/help` | The keys and commands | The bottom line shows the connection: `●` connected (version, model, memory), `○` no server (the screen gives the `rzb serve` command to run, with `--config` when one was given), `✕` API key refused or server on another machine. | ||
| 67 | 95 | ||
| 68 | Errors: a `--url` that is not an http(s) address gives exit code 64; an invalid `--config` file, exit code 2; no terminal on standard input and output, `error: rzb tui needs a terminal …` and exit code 1. | 96 | Errors: a `--url` that is not an http(s) address gives exit code 64; an invalid `--config` file, exit code 2; no terminal on standard input and output, `error: rzb tui needs a terminal …` and exit code 1. |
| 69 | 97 | ||
modified
docs/en/reference/http-api.md +5 -4 | @@ -328,7 +328,7 @@ curl -s http://127.0.0.1:7920/rzb/status | ||
| 328 | 328 | | `uptime_seconds` | integer | Seconds since the server started | |
| 329 | 329 | | `host`, `port` | string, integer | The configured address (`port` is `0` when the server picked a free port) | |
| 330 | 330 | | `models` | array | The models loaded or being loaded, sorted by `key` (table below); `[]` when none | |
| 331 | -| `recent_requests` | array | The last 50 requests answered, newest first (table below) | | |
| 331 | +| `recent_requests` | array | The last 50 requests answered, newest first, each recorded once its last byte is sent (table below) | | |
| 332 | 332 | | `memory` | object or `null` | The engine's memory (table below); `null` when the engine cannot measure it (the Linux build) | |
| 333 | 333 | |
| 334 | 334 | | Field of a model | Type | Value | |
| @@ -347,9 +347,10 @@ curl -s http://127.0.0.1:7920/rzb/status | ||
| 347 | 347 | | --- | --- | --- | |
| 348 | 348 | | `method`, `path`, `status` | string, string, integer | The request and its answer's status | |
| 349 | 349 | | `model` | string or `null` | The model it used | |
| 350 | -| `prompt_tokens`, `completion_tokens` | integer or `null` | Its token counts, when it generated | | |
| 350 | +| `prompt_tokens`, `completion_tokens` | integer or `null` | Its token counts, when it generated (streamed answers included) | | |
| 351 | 351 | | `cached_tokens` | integer | Prompt tokens reused from the previous request | |
| 352 | -| `duration_ms` | integer | Time to the response head (to the first byte, for a stream) | | |
| 352 | +| `first_byte_ms` | integer | Time to the response head: for a stream, to its first chunk | | |
| 353 | +| `duration_ms` | integer | Time to the last byte of the answer | | |
| 353 | 354 | | `finished_at` | integer | Unix seconds | |
| 354 | 355 | |
| 355 | 356 | | Field of `memory` | Type | Value | |
| @@ -366,7 +367,7 @@ Example, after one chat request: | ||
| 366 | 367 | "memory": {"active_bytes": 364743776, "cache_bytes": 23594047, "limit_bytes": 32641751449, "peak_bytes": 408882564}, |
| 367 | 368 | "models": [{"busy": false, "idle_seconds": 7, "keep_alive_left_seconds": 592.9, "key": "mlx-community/Qwen3-0.6B-4bit", |
| 368 | 369 | "kind": "chat", "name": "qwen", "queued": 0, "size_bytes": 335450584, "state": "loaded"}], |
| 369 | - "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, | |
| 370 | + "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, "first_byte_ms": 529, | |
| 370 | 371 | "method": "POST", "model": "qwen", "path": "/v1/chat/completions", "prompt_tokens": 14, "status": 200}]} |
| 371 | 372 | ``` |
| 372 | 373 | |
| @@ -328,7 +328,7 @@ curl -s http://127.0.0.1:7920/rzb/status | |||
| 328 | | `uptime_seconds` | integer | Seconds since the server started | | 328 | | `uptime_seconds` | integer | Seconds since the server started | |
| 329 | | `host`, `port` | string, integer | The configured address (`port` is `0` when the server picked a free port) | | 329 | | `host`, `port` | string, integer | The configured address (`port` is `0` when the server picked a free port) | |
| 330 | | `models` | array | The models loaded or being loaded, sorted by `key` (table below); `[]` when none | | 330 | | `models` | array | The models loaded or being loaded, sorted by `key` (table below); `[]` when none | |
| 331 | -| `recent_requests` | array | The last 50 requests answered, newest first (table below) | | 331 | +| `recent_requests` | array | The last 50 requests answered, newest first, each recorded once its last byte is sent (table below) | |
| 332 | | `memory` | object or `null` | The engine's memory (table below); `null` when the engine cannot measure it (the Linux build) | | 332 | | `memory` | object or `null` | The engine's memory (table below); `null` when the engine cannot measure it (the Linux build) | |
| 333 | 333 | ||
| 334 | | Field of a model | Type | Value | | 334 | | Field of a model | Type | Value | |
| @@ -347,9 +347,10 @@ curl -s http://127.0.0.1:7920/rzb/status | |||
| 347 | | --- | --- | --- | | 347 | | --- | --- | --- | |
| 348 | | `method`, `path`, `status` | string, string, integer | The request and its answer's status | | 348 | | `method`, `path`, `status` | string, string, integer | The request and its answer's status | |
| 349 | | `model` | string or `null` | The model it used | | 349 | | `model` | string or `null` | The model it used | |
| 350 | -| `prompt_tokens`, `completion_tokens` | integer or `null` | Its token counts, when it generated | | 350 | +| `prompt_tokens`, `completion_tokens` | integer or `null` | Its token counts, when it generated (streamed answers included) | |
| 351 | | `cached_tokens` | integer | Prompt tokens reused from the previous request | | 351 | | `cached_tokens` | integer | Prompt tokens reused from the previous request | |
| 352 | -| `duration_ms` | integer | Time to the response head (to the first byte, for a stream) | | 352 | +| `first_byte_ms` | integer | Time to the response head: for a stream, to its first chunk | |
| 353 | +| `duration_ms` | integer | Time to the last byte of the answer | | ||
| 353 | | `finished_at` | integer | Unix seconds | | 354 | | `finished_at` | integer | Unix seconds | |
| 354 | 355 | ||
| 355 | | Field of `memory` | Type | Value | | 356 | | Field of `memory` | Type | Value | |
| @@ -366,7 +367,7 @@ Example, after one chat request: | |||
| 366 | "memory": {"active_bytes": 364743776, "cache_bytes": 23594047, "limit_bytes": 32641751449, "peak_bytes": 408882564}, | 367 | "memory": {"active_bytes": 364743776, "cache_bytes": 23594047, "limit_bytes": 32641751449, "peak_bytes": 408882564}, |
| 367 | "models": [{"busy": false, "idle_seconds": 7, "keep_alive_left_seconds": 592.9, "key": "mlx-community/Qwen3-0.6B-4bit", | 368 | "models": [{"busy": false, "idle_seconds": 7, "keep_alive_left_seconds": 592.9, "key": "mlx-community/Qwen3-0.6B-4bit", |
| 368 | "kind": "chat", "name": "qwen", "queued": 0, "size_bytes": 335450584, "state": "loaded"}], | 369 | "kind": "chat", "name": "qwen", "queued": 0, "size_bytes": 335450584, "state": "loaded"}], |
| 369 | - "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, | 370 | + "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, "first_byte_ms": 529, |
| 370 | "method": "POST", "model": "qwen", "path": "/v1/chat/completions", "prompt_tokens": 14, "status": 200}]} | 371 | "method": "POST", "model": "qwen", "path": "/v1/chat/completions", "prompt_tokens": 14, "status": 200}]} |
| 371 | ``` | 372 | ``` |
| 372 | 373 | ||
modified
docs/fr/how-to/surveiller-et-piloter-le-serveur.md +2 -0 | @@ -18,6 +18,8 @@ curl -s -X POST http://127.0.0.1:7920/rzb/models/qwen3/unload | ||
| 18 | 18 | |
| 19 | 19 | Utilise le nom qu'utilisent les clients : un `id` déclaré, ou un id Hugging Face comme `mlx-community/Qwen3-4B-4bit` (le `/` reste tel quel dans le chemin). La réponse dit `unloaded`, ou `not_loaded` quand il n'y avait rien à libérer. |
| 20 | 20 | |
| 21 | +Dans [`rzb tui`](../reference/ligne-de-commande.md#rzb-tui), choisis le modèle sur le Dashboard et appuie sur `u` : la réponse s'affiche sous les requêtes. | |
| 22 | + | |
| 21 | 23 | Si la réponse est un 409 `model_busy`, une requête génère avec le modèle ou l'attend. Rien n'a été déchargé : réessaie quand l'état montre `busy` à `false` et `queued` à `0`. La requête suivante pour le modèle le recharge. |
| 22 | 24 | |
| 23 | 25 | ## Appliquer un changement de configuration sans redémarrer |
| @@ -18,6 +18,8 @@ curl -s -X POST http://127.0.0.1:7920/rzb/models/qwen3/unload | |||
| 18 | 18 | ||
| 19 | Utilise le nom qu'utilisent les clients : un `id` déclaré, ou un id Hugging Face comme `mlx-community/Qwen3-4B-4bit` (le `/` reste tel quel dans le chemin). La réponse dit `unloaded`, ou `not_loaded` quand il n'y avait rien à libérer. | 19 | Utilise le nom qu'utilisent les clients : un `id` déclaré, ou un id Hugging Face comme `mlx-community/Qwen3-4B-4bit` (le `/` reste tel quel dans le chemin). La réponse dit `unloaded`, ou `not_loaded` quand il n'y avait rien à libérer. |
| 20 | 20 | ||
| 21 | +Dans [`rzb tui`](../reference/ligne-de-commande.md#rzb-tui), choisis le modèle sur le Dashboard et appuie sur `u` : la réponse s'affiche sous les requêtes. | ||
| 22 | + | ||
| 21 | Si la réponse est un 409 `model_busy`, une requête génère avec le modèle ou l'attend. Rien n'a été déchargé : réessaie quand l'état montre `busy` à `false` et `queued` à `0`. La requête suivante pour le modèle le recharge. | 23 | Si la réponse est un 409 `model_busy`, une requête génère avec le modèle ou l'attend. Rien n'a été déchargé : réessaie quand l'état montre `busy` à `false` et `queued` à `0`. La requête suivante pour le modèle le recharge. |
| 22 | 24 | ||
| 23 | ## Appliquer un changement de configuration sans redémarrer | 25 | ## Appliquer un changement de configuration sans redémarrer |
modified
docs/fr/reference/api-http.md +5 -4 | @@ -328,7 +328,7 @@ curl -s http://127.0.0.1:7920/rzb/status | ||
| 328 | 328 | | `uptime_seconds` | entier | Secondes écoulées depuis le démarrage du serveur | |
| 329 | 329 | | `host`, `port` | chaîne, entier | L'adresse configurée (`port` vaut `0` quand le serveur a choisi un port libre) | |
| 330 | 330 | | `models` | tableau | Les modèles chargés ou en cours de chargement, triés par `key` (tableau ci-dessous) ; `[]` s'il n'y en a aucun | |
| 331 | -| `recent_requests` | tableau | Les 50 dernières requêtes traitées, la plus récente d'abord (tableau ci-dessous) | | |
| 331 | +| `recent_requests` | tableau | Les 50 dernières requêtes traitées, la plus récente d'abord, chacune enregistrée une fois son dernier octet envoyé (tableau ci-dessous) | | |
| 332 | 332 | | `memory` | objet ou `null` | La mémoire du moteur (tableau ci-dessous) ; `null` quand le moteur ne sait pas la mesurer (la version Linux) | |
| 333 | 333 | |
| 334 | 334 | | Champ d'un modèle | Type | Valeur | |
| @@ -347,9 +347,10 @@ curl -s http://127.0.0.1:7920/rzb/status | ||
| 347 | 347 | | --- | --- | --- | |
| 348 | 348 | | `method`, `path`, `status` | chaîne, chaîne, entier | La requête et le statut de sa réponse | |
| 349 | 349 | | `model` | chaîne ou `null` | Le modèle qu'elle a utilisé | |
| 350 | -| `prompt_tokens`, `completion_tokens` | entier ou `null` | Ses nombres de tokens, quand elle a généré | | |
| 350 | +| `prompt_tokens`, `completion_tokens` | entier ou `null` | Ses nombres de tokens, quand elle a généré (réponses en flux comprises) | | |
| 351 | 351 | | `cached_tokens` | entier | Tokens du prompt repris de la requête précédente | |
| 352 | -| `duration_ms` | entier | Temps jusqu'à l'en-tête de la réponse (jusqu'au premier octet, pour un flux) | | |
| 352 | +| `first_byte_ms` | entier | Temps jusqu'à l'en-tête de la réponse : pour un flux, jusqu'à son premier morceau | | |
| 353 | +| `duration_ms` | entier | Temps jusqu'au dernier octet de la réponse | | |
| 353 | 354 | | `finished_at` | entier | Secondes Unix | |
| 354 | 355 | |
| 355 | 356 | | Champ de `memory` | Type | Valeur | |
| @@ -366,7 +367,7 @@ Exemple, après une requête de chat : | ||
| 366 | 367 | "memory": {"active_bytes": 364743776, "cache_bytes": 23594047, "limit_bytes": 32641751449, "peak_bytes": 408882564}, |
| 367 | 368 | "models": [{"busy": false, "idle_seconds": 7, "keep_alive_left_seconds": 592.9, "key": "mlx-community/Qwen3-0.6B-4bit", |
| 368 | 369 | "kind": "chat", "name": "qwen", "queued": 0, "size_bytes": 335450584, "state": "loaded"}], |
| 369 | - "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, | |
| 370 | + "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, "first_byte_ms": 529, | |
| 370 | 371 | "method": "POST", "model": "qwen", "path": "/v1/chat/completions", "prompt_tokens": 14, "status": 200}]} |
| 371 | 372 | ``` |
| 372 | 373 | |
| @@ -328,7 +328,7 @@ curl -s http://127.0.0.1:7920/rzb/status | |||
| 328 | | `uptime_seconds` | entier | Secondes écoulées depuis le démarrage du serveur | | 328 | | `uptime_seconds` | entier | Secondes écoulées depuis le démarrage du serveur | |
| 329 | | `host`, `port` | chaîne, entier | L'adresse configurée (`port` vaut `0` quand le serveur a choisi un port libre) | | 329 | | `host`, `port` | chaîne, entier | L'adresse configurée (`port` vaut `0` quand le serveur a choisi un port libre) | |
| 330 | | `models` | tableau | Les modèles chargés ou en cours de chargement, triés par `key` (tableau ci-dessous) ; `[]` s'il n'y en a aucun | | 330 | | `models` | tableau | Les modèles chargés ou en cours de chargement, triés par `key` (tableau ci-dessous) ; `[]` s'il n'y en a aucun | |
| 331 | -| `recent_requests` | tableau | Les 50 dernières requêtes traitées, la plus récente d'abord (tableau ci-dessous) | | 331 | +| `recent_requests` | tableau | Les 50 dernières requêtes traitées, la plus récente d'abord, chacune enregistrée une fois son dernier octet envoyé (tableau ci-dessous) | |
| 332 | | `memory` | objet ou `null` | La mémoire du moteur (tableau ci-dessous) ; `null` quand le moteur ne sait pas la mesurer (la version Linux) | | 332 | | `memory` | objet ou `null` | La mémoire du moteur (tableau ci-dessous) ; `null` quand le moteur ne sait pas la mesurer (la version Linux) | |
| 333 | 333 | ||
| 334 | | Champ d'un modèle | Type | Valeur | | 334 | | Champ d'un modèle | Type | Valeur | |
| @@ -347,9 +347,10 @@ curl -s http://127.0.0.1:7920/rzb/status | |||
| 347 | | --- | --- | --- | | 347 | | --- | --- | --- | |
| 348 | | `method`, `path`, `status` | chaîne, chaîne, entier | La requête et le statut de sa réponse | | 348 | | `method`, `path`, `status` | chaîne, chaîne, entier | La requête et le statut de sa réponse | |
| 349 | | `model` | chaîne ou `null` | Le modèle qu'elle a utilisé | | 349 | | `model` | chaîne ou `null` | Le modèle qu'elle a utilisé | |
| 350 | -| `prompt_tokens`, `completion_tokens` | entier ou `null` | Ses nombres de tokens, quand elle a généré | | 350 | +| `prompt_tokens`, `completion_tokens` | entier ou `null` | Ses nombres de tokens, quand elle a généré (réponses en flux comprises) | |
| 351 | | `cached_tokens` | entier | Tokens du prompt repris de la requête précédente | | 351 | | `cached_tokens` | entier | Tokens du prompt repris de la requête précédente | |
| 352 | -| `duration_ms` | entier | Temps jusqu'à l'en-tête de la réponse (jusqu'au premier octet, pour un flux) | | 352 | +| `first_byte_ms` | entier | Temps jusqu'à l'en-tête de la réponse : pour un flux, jusqu'à son premier morceau | |
| 353 | +| `duration_ms` | entier | Temps jusqu'au dernier octet de la réponse | | ||
| 353 | | `finished_at` | entier | Secondes Unix | | 354 | | `finished_at` | entier | Secondes Unix | |
| 354 | 355 | ||
| 355 | | Champ de `memory` | Type | Valeur | | 356 | | Champ de `memory` | Type | Valeur | |
| @@ -366,7 +367,7 @@ Exemple, après une requête de chat : | |||
| 366 | "memory": {"active_bytes": 364743776, "cache_bytes": 23594047, "limit_bytes": 32641751449, "peak_bytes": 408882564}, | 367 | "memory": {"active_bytes": 364743776, "cache_bytes": 23594047, "limit_bytes": 32641751449, "peak_bytes": 408882564}, |
| 367 | "models": [{"busy": false, "idle_seconds": 7, "keep_alive_left_seconds": 592.9, "key": "mlx-community/Qwen3-0.6B-4bit", | 368 | "models": [{"busy": false, "idle_seconds": 7, "keep_alive_left_seconds": 592.9, "key": "mlx-community/Qwen3-0.6B-4bit", |
| 368 | "kind": "chat", "name": "qwen", "queued": 0, "size_bytes": 335450584, "state": "loaded"}], | 369 | "kind": "chat", "name": "qwen", "queued": 0, "size_bytes": 335450584, "state": "loaded"}], |
| 369 | - "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, | 370 | + "recent_requests": [{"cached_tokens": 0, "completion_tokens": 9, "duration_ms": 529, "finished_at": 1795728740, "first_byte_ms": 529, |
| 370 | "method": "POST", "model": "qwen", "path": "/v1/chat/completions", "prompt_tokens": 14, "status": 200}]} | 371 | "method": "POST", "model": "qwen", "path": "/v1/chat/completions", "prompt_tokens": 14, "status": 200}]} |
| 371 | ``` | 372 | ``` |
| 372 | 373 | ||
modified
docs/fr/reference/ligne-de-commande.md +30 -2 | @@ -61,9 +61,37 @@ Ouvre une interface plein écran sur un `rzb serve` qui tourne sur la même mach | ||
| 61 | 61 | | --- | --- | |
| 62 | 62 | | `F1` `F2` `F3` `F4` | Écran Chat, Dashboard, Models, Settings | |
| 63 | 63 | | `Ctrl-T` | Écran suivant | |
| 64 | -| `Ctrl-Q`, `Ctrl-C` | Quitter | | |
| 64 | +| `Ctrl-Q` | Quitter | | |
| 65 | +| `Ctrl-C` | Arrêter la réponse en cours sur l'écran Chat ; quitter sinon | | |
| 65 | 66 | |
| 66 | -Le premier écran est le Dashboard : la version, la durée de fonctionnement et l'adresse du serveur, la mémoire du moteur, les modèles chargés (état, taille, temps d'inactivité, temps restant avant que `keep_alive` les décharge, ou occupation et requêtes en attente) et les dernières requêtes. Les écrans Chat, Models et Settings ne sont pas encore construits. La ligne du bas montre la connexion : `●` connecté (version, modèle, mémoire), `○` pas de serveur (l'écran donne la commande `rzb serve` à lancer, avec `--config` quand il a été donné), `✕` clé d'API refusée ou serveur sur une autre machine. | |
| 67 | +Les écrans Models et Settings ne sont pas encore construits. | |
| 68 | + | |
| 69 | +**Dashboard** (le premier écran) : la version, la durée de fonctionnement et l'adresse du serveur ; la mémoire du moteur en jauge (active sur limite), avec le cache et le maximum ; les modèles chargés (nom, type, état, taille, puis temps d'inactivité et temps restant avant que `keep_alive` les décharge, ou occupation et requêtes en attente) ; les dernières requêtes (âge, méthode et chemin, statut, modèle, tokens prompt+complétion, tokens en cache, tokens de complétion par seconde sur toute la requête, durée). | |
| 70 | + | |
| 71 | +| Touche | Effet | | |
| 72 | +| --- | --- | | |
| 73 | +| `↑` `↓` `PgUp` `PgDn` `Home` `End` | Choisir un modèle | | |
| 74 | +| `u` | Décharger le modèle choisi ([`POST /rzb/models/{id}/unload`](api-http.md#post-rzbmodelsidunload)) ; la réponse du serveur s'affiche sous les requêtes, y compris son refus quand le modèle est en cours d'utilisation | | |
| 75 | + | |
| 76 | +**Chat** : une conversation en flux avec un modèle du serveur. Elle est gardée par `rzb tui` et renvoyée entière à chaque message. Le modèle est le premier modèle de chat chargé de `/v1/models`, sinon le premier modèle de chat listé. Après chaque réponse : tokens prompt+complétion, tokens du prompt repris du cache, tokens par seconde du premier morceau au dernier. | |
| 77 | + | |
| 78 | +| Touche | Effet | | |
| 79 | +| --- | --- | | |
| 80 | +| `Entrée` | Envoyer le message, ou lancer une commande | | |
| 81 | +| `Échap` | Arrêter la réponse en cours (ce qui est arrivé reste et fait partie de la conversation) | | |
| 82 | +| `Ctrl-N` | Nouvelle conversation | | |
| 83 | +| `Ctrl-P` | Choisir le modèle (`↑` `↓`, `Entrée` ; `Échap` ferme la liste) | | |
| 84 | +| `Ctrl-R` | Raisonnement replié (une ligne avec sa longueur), masqué, puis affiché | | |
| 85 | +| `PgUp` `PgDn` | Faire défiler la conversation | | |
| 86 | +| `←` `→` `Home` `End` `Ctrl-A` `Ctrl-E` `Retour arrière` `Suppr` | Modifier le message | | |
| 87 | + | |
| 88 | +| Commande | Effet | | |
| 89 | +| --- | --- | | |
| 90 | +| `/set <nom> <valeur>` | Échantillonnage des messages suivants : `temperature` (0–2), `top_p` (0–1), `top_k` (≥ 0), `min_p` (0–1), `max_tokens` (≥ 1), `thinking` (`on`, `off`) | | |
| 91 | +| `/set <nom>` | Rendre le réglage à la valeur du serveur | | |
| 92 | +| `/set` | Afficher les réglages | | |
| 93 | +| `/clear` | Nouvelle conversation | | |
| 94 | +| `/help` | Les touches et les commandes | La ligne du bas montre la connexion : `●` connecté (version, modèle, mémoire), `○` pas de serveur (l'écran donne la commande `rzb serve` à lancer, avec `--config` quand il a été donné), `✕` clé d'API refusée ou serveur sur une autre machine. | |
| 67 | 95 | |
| 68 | 96 | Erreurs : un `--url` qui n'est pas une adresse http(s) donne le code de sortie 64 ; un fichier `--config` invalide, le code 2 ; pas de terminal sur l'entrée et la sortie standard, `error: rzb tui needs a terminal …` et le code 1. |
| 69 | 97 | |
| @@ -61,9 +61,37 @@ Ouvre une interface plein écran sur un `rzb serve` qui tourne sur la même mach | |||
| 61 | | --- | --- | | 61 | | --- | --- | |
| 62 | | `F1` `F2` `F3` `F4` | Écran Chat, Dashboard, Models, Settings | | 62 | | `F1` `F2` `F3` `F4` | Écran Chat, Dashboard, Models, Settings | |
| 63 | | `Ctrl-T` | Écran suivant | | 63 | | `Ctrl-T` | Écran suivant | |
| 64 | -| `Ctrl-Q`, `Ctrl-C` | Quitter | | 64 | +| `Ctrl-Q` | Quitter | |
| 65 | +| `Ctrl-C` | Arrêter la réponse en cours sur l'écran Chat ; quitter sinon | | ||
| 65 | 66 | ||
| 66 | -Le premier écran est le Dashboard : la version, la durée de fonctionnement et l'adresse du serveur, la mémoire du moteur, les modèles chargés (état, taille, temps d'inactivité, temps restant avant que `keep_alive` les décharge, ou occupation et requêtes en attente) et les dernières requêtes. Les écrans Chat, Models et Settings ne sont pas encore construits. La ligne du bas montre la connexion : `●` connecté (version, modèle, mémoire), `○` pas de serveur (l'écran donne la commande `rzb serve` à lancer, avec `--config` quand il a été donné), `✕` clé d'API refusée ou serveur sur une autre machine. | 67 | +Les écrans Models et Settings ne sont pas encore construits. |
| 68 | + | ||
| 69 | +**Dashboard** (le premier écran) : la version, la durée de fonctionnement et l'adresse du serveur ; la mémoire du moteur en jauge (active sur limite), avec le cache et le maximum ; les modèles chargés (nom, type, état, taille, puis temps d'inactivité et temps restant avant que `keep_alive` les décharge, ou occupation et requêtes en attente) ; les dernières requêtes (âge, méthode et chemin, statut, modèle, tokens prompt+complétion, tokens en cache, tokens de complétion par seconde sur toute la requête, durée). | ||
| 70 | + | ||
| 71 | +| Touche | Effet | | ||
| 72 | +| --- | --- | | ||
| 73 | +| `↑` `↓` `PgUp` `PgDn` `Home` `End` | Choisir un modèle | | ||
| 74 | +| `u` | Décharger le modèle choisi ([`POST /rzb/models/{id}/unload`](api-http.md#post-rzbmodelsidunload)) ; la réponse du serveur s'affiche sous les requêtes, y compris son refus quand le modèle est en cours d'utilisation | | ||
| 75 | + | ||
| 76 | +**Chat** : une conversation en flux avec un modèle du serveur. Elle est gardée par `rzb tui` et renvoyée entière à chaque message. Le modèle est le premier modèle de chat chargé de `/v1/models`, sinon le premier modèle de chat listé. Après chaque réponse : tokens prompt+complétion, tokens du prompt repris du cache, tokens par seconde du premier morceau au dernier. | ||
| 77 | + | ||
| 78 | +| Touche | Effet | | ||
| 79 | +| --- | --- | | ||
| 80 | +| `Entrée` | Envoyer le message, ou lancer une commande | | ||
| 81 | +| `Échap` | Arrêter la réponse en cours (ce qui est arrivé reste et fait partie de la conversation) | | ||
| 82 | +| `Ctrl-N` | Nouvelle conversation | | ||
| 83 | +| `Ctrl-P` | Choisir le modèle (`↑` `↓`, `Entrée` ; `Échap` ferme la liste) | | ||
| 84 | +| `Ctrl-R` | Raisonnement replié (une ligne avec sa longueur), masqué, puis affiché | | ||
| 85 | +| `PgUp` `PgDn` | Faire défiler la conversation | | ||
| 86 | +| `←` `→` `Home` `End` `Ctrl-A` `Ctrl-E` `Retour arrière` `Suppr` | Modifier le message | | ||
| 87 | + | ||
| 88 | +| Commande | Effet | | ||
| 89 | +| --- | --- | | ||
| 90 | +| `/set <nom> <valeur>` | Échantillonnage des messages suivants : `temperature` (0–2), `top_p` (0–1), `top_k` (≥ 0), `min_p` (0–1), `max_tokens` (≥ 1), `thinking` (`on`, `off`) | | ||
| 91 | +| `/set <nom>` | Rendre le réglage à la valeur du serveur | | ||
| 92 | +| `/set` | Afficher les réglages | | ||
| 93 | +| `/clear` | Nouvelle conversation | | ||
| 94 | +| `/help` | Les touches et les commandes | La ligne du bas montre la connexion : `●` connecté (version, modèle, mémoire), `○` pas de serveur (l'écran donne la commande `rzb serve` à lancer, avec `--config` quand il a été donné), `✕` clé d'API refusée ou serveur sur une autre machine. | ||
| 67 | 95 | ||
| 68 | Erreurs : un `--url` qui n'est pas une adresse http(s) donne le code de sortie 64 ; un fichier `--config` invalide, le code 2 ; pas de terminal sur l'entrée et la sortie standard, `error: rzb tui needs a terminal …` et le code 1. | 96 | Erreurs : un `--url` qui n'est pas une adresse http(s) donne le code de sortie 64 ; un fichier `--config` invalide, le code 2 ; pas de terminal sur l'entrée et la sortie standard, `error: rzb tui needs a terminal …` et le code 1. |
| 69 | 97 | ||