coderouter-cli 2.9.3__py3-none-any.whl → 2.9.4__py3-none-any.whl
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.
- coderouter/config/schemas.py +50 -0
- coderouter/ingress/launcher_routes.py +796 -3
- coderouter/launcher_devices.py +518 -0
- coderouter/translation/anthropic.py +26 -5
- {coderouter_cli-2.9.3.dist-info → coderouter_cli-2.9.4.dist-info}/METADATA +2 -2
- {coderouter_cli-2.9.3.dist-info → coderouter_cli-2.9.4.dist-info}/RECORD +9 -8
- {coderouter_cli-2.9.3.dist-info → coderouter_cli-2.9.4.dist-info}/WHEEL +0 -0
- {coderouter_cli-2.9.3.dist-info → coderouter_cli-2.9.4.dist-info}/entry_points.txt +0 -0
- {coderouter_cli-2.9.3.dist-info → coderouter_cli-2.9.4.dist-info}/licenses/LICENSE +0 -0
coderouter/config/schemas.py
CHANGED
|
@@ -1460,6 +1460,49 @@ class LauncherOptionProfile(BaseModel):
|
|
|
1460
1460
|
)
|
|
1461
1461
|
|
|
1462
1462
|
|
|
1463
|
+
class LauncherBenchConfig(BaseModel):
|
|
1464
|
+
"""The ``launcher.bench:`` block — defaults for the bench sweep feature.
|
|
1465
|
+
|
|
1466
|
+
設計 §4.1。デバイス構成スイープ(起動→readiness→外部ベンチ→停止→次)の
|
|
1467
|
+
既定値を providers.yaml から供給する。未設定(``LauncherConfig.bench`` が
|
|
1468
|
+
None)ならスイープ UI はハードコード既定を使う(完全後方互換)。すべての
|
|
1469
|
+
フィールドに ``default`` があるので、既存 YAML は無改変で通過する。
|
|
1470
|
+
"""
|
|
1471
|
+
|
|
1472
|
+
model_config = ConfigDict(extra="forbid")
|
|
1473
|
+
|
|
1474
|
+
command_template: str = Field(
|
|
1475
|
+
default="llmbench run --model local-openai --runs {runs}",
|
|
1476
|
+
description=(
|
|
1477
|
+
"外部ベンチコマンドのテンプレ。``{port}`` ``{config}`` "
|
|
1478
|
+
"``{base_url}`` ``{results_dir}`` ``{runs}`` を単純置換で展開して "
|
|
1479
|
+
"argv 化する(``str.format`` ではないので JSON 波括弧で誤爆しない)。"
|
|
1480
|
+
),
|
|
1481
|
+
)
|
|
1482
|
+
runs: int = Field(
|
|
1483
|
+
default=5,
|
|
1484
|
+
ge=1,
|
|
1485
|
+
le=1000,
|
|
1486
|
+
description="1 構成あたりのベンチ実行回数。``{runs}`` に展開される。",
|
|
1487
|
+
)
|
|
1488
|
+
results_dir: str | None = Field(
|
|
1489
|
+
default=None,
|
|
1490
|
+
description=(
|
|
1491
|
+
"llmbench の results/ ディレクトリ。相対はサーバ CWD 基準。"
|
|
1492
|
+
"設定時のみスイープ結果 JSON を読み比較サマリを付与する。"
|
|
1493
|
+
),
|
|
1494
|
+
)
|
|
1495
|
+
readiness_timeout_s: float = Field(
|
|
1496
|
+
default=300.0,
|
|
1497
|
+
ge=5.0,
|
|
1498
|
+
le=3600.0,
|
|
1499
|
+
description=(
|
|
1500
|
+
"スイープの各構成でサーバが ready になるのを待つ最大秒数。"
|
|
1501
|
+
"大きな GGUF ロードを考慮した既定 5 分。"
|
|
1502
|
+
),
|
|
1503
|
+
)
|
|
1504
|
+
|
|
1505
|
+
|
|
1463
1506
|
class SwapModelSpec(BaseModel):
|
|
1464
1507
|
"""One entry in ``launcher.swap.models`` (docs/designs/launcher-model-swap.md).
|
|
1465
1508
|
|
|
@@ -1863,6 +1906,13 @@ class LauncherConfig(BaseModel):
|
|
|
1863
1906
|
"behavior."
|
|
1864
1907
|
),
|
|
1865
1908
|
)
|
|
1909
|
+
bench: LauncherBenchConfig | None = Field(
|
|
1910
|
+
default=None,
|
|
1911
|
+
description=(
|
|
1912
|
+
"デバイス構成ベンチスイープ(設計 §4)の既定値。None(既定)なら "
|
|
1913
|
+
"スイープ UI はハードコード既定を使う=完全後方互換。"
|
|
1914
|
+
),
|
|
1915
|
+
)
|
|
1866
1916
|
|
|
1867
1917
|
@model_validator(mode="after")
|
|
1868
1918
|
def _check_auto_restart_backoff_ordered(self) -> LauncherConfig:
|