coderouter-cli 2.4.0__tar.gz → 2.5.1__tar.gz

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 (194) hide show
  1. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/CHANGELOG.md +80 -0
  2. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/PKG-INFO +49 -17
  3. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/README.en.md +48 -16
  4. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/README.md +48 -16
  5. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/cli.py +3 -3
  6. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/config/capability_registry.py +1 -1
  7. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/config/schemas.py +135 -0
  8. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/data/model-capabilities.yaml +2 -2
  9. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/ingress/app.py +11 -0
  10. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/ingress/dashboard_routes.py +1 -0
  11. coderouter_cli-2.5.1/coderouter/ingress/launcher_routes.py +1187 -0
  12. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/logging.py +2 -2
  13. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/routing/capability.py +1 -1
  14. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/state/suggest_rules.py +4 -4
  15. coderouter_cli-2.5.1/docs/README.md +94 -0
  16. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/hf-ollama-models.md +2 -2
  17. coderouter_cli-2.5.1/docs/backends/launcher-gui.md +200 -0
  18. coderouter_cli-2.5.1/docs/backends/launcher-quickstart.md +187 -0
  19. coderouter_cli-2.5.1/docs/backends/launcher.md +288 -0
  20. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/llamacpp-direct.en.md +3 -3
  21. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/llamacpp-direct.md +4 -4
  22. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/lmstudio-direct.en.md +3 -3
  23. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/lmstudio-direct.md +3 -3
  24. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/concepts}/architecture.md +83 -3
  25. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/designs/v1.6-auto-router.md +1 -1
  26. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/free-tier-guide.en.md +5 -5
  27. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/free-tier-guide.md +7 -7
  28. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/troubleshooting.en.md +1 -1
  29. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/troubleshooting.md +1 -1
  30. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/usage-guide.en.md +5 -5
  31. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/usage-guide.md +4 -4
  32. coderouter_cli-2.5.1/docs/openrouter-roster/CHANGES.md +50 -0
  33. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/openrouter-roster/latest.json +11 -41
  34. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/start}/quickstart.en.md +31 -12
  35. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/start}/quickstart.md +32 -12
  36. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/start}/when-do-i-need-coderouter.en.md +1 -1
  37. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/start}/when-do-i-need-coderouter.md +1 -1
  38. coderouter_cli-2.5.1/examples/providers.llama-cpp-vllm.yaml +151 -0
  39. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.nvidia-nim.yaml +1 -1
  40. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.yaml +3 -3
  41. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/pyproject.toml +1 -1
  42. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/verify_ollama_0_23.py +4 -5
  43. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_examples_yaml.py +1 -1
  44. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_setup_sh.py +1 -1
  45. coderouter_cli-2.4.0/docs/openrouter-roster/CHANGES.md +0 -24
  46. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/.gitignore +0 -0
  47. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/LICENSE +0 -0
  48. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/__init__.py +0 -0
  49. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/__main__.py +0 -0
  50. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/adapters/__init__.py +0 -0
  51. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/adapters/anthropic_native.py +0 -0
  52. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/adapters/base.py +0 -0
  53. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/adapters/openai_compat.py +0 -0
  54. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/adapters/registry.py +0 -0
  55. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/cli_stats.py +0 -0
  56. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/config/__init__.py +0 -0
  57. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/config/env_file.py +0 -0
  58. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/config/loader.py +0 -0
  59. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/cost.py +0 -0
  60. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/data/__init__.py +0 -0
  61. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/doctor.py +0 -0
  62. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/doctor_apply.py +0 -0
  63. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/env_security.py +0 -0
  64. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/errors.py +0 -0
  65. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/__init__.py +0 -0
  66. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/_fingerprint.py +0 -0
  67. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/backend_health.py +0 -0
  68. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/context_budget.py +0 -0
  69. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/continuous_probe.py +0 -0
  70. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/drift_actions.py +0 -0
  71. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/drift_detection.py +0 -0
  72. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/memory_pressure.py +0 -0
  73. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/self_healing.py +0 -0
  74. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/guards/tool_loop.py +0 -0
  75. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/ingress/__init__.py +0 -0
  76. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/ingress/anthropic_routes.py +0 -0
  77. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/ingress/metrics_routes.py +0 -0
  78. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/ingress/openai_routes.py +0 -0
  79. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/metrics/__init__.py +0 -0
  80. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/metrics/collector.py +0 -0
  81. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/metrics/prometheus.py +0 -0
  82. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/output_filters.py +0 -0
  83. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/plugins/__init__.py +0 -0
  84. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/plugins/base.py +0 -0
  85. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/plugins/loader.py +0 -0
  86. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/plugins/registry.py +0 -0
  87. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/routing/__init__.py +0 -0
  88. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/routing/adaptive.py +0 -0
  89. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/routing/auto_router.py +0 -0
  90. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/routing/budget.py +0 -0
  91. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/routing/fallback.py +0 -0
  92. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/state/__init__.py +0 -0
  93. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/state/audit_log.py +0 -0
  94. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/state/replay.py +0 -0
  95. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/state/request_log.py +0 -0
  96. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/state/store.py +0 -0
  97. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/token_estimation.py +0 -0
  98. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/translation/__init__.py +0 -0
  99. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/translation/anthropic.py +0 -0
  100. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/translation/convert.py +0 -0
  101. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/coderouter/translation/tool_repair.py +0 -0
  102. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/assets/dashboard-demo.png +0 -0
  103. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/gguf_dl.md +0 -0
  104. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/backends}/verify-ollama-0.23.1.md +0 -0
  105. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/concepts}/context-budget.md +0 -0
  106. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/concepts}/continuous-probing.md +0 -0
  107. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/concepts}/drift-detection.md +0 -0
  108. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/concepts}/partial-stitch.md +0 -0
  109. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/designs/v1.5-dashboard-mockup.html +0 -0
  110. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/designs/v1.6-auto-router-verification.md +0 -0
  111. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/security.en.md +0 -0
  112. {coderouter_cli-2.4.0/docs → coderouter_cli-2.5.1/docs/guides}/security.md +0 -0
  113. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/openrouter-roster/README.md +0 -0
  114. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v0.4.md +0 -0
  115. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v0.5-verify.md +0 -0
  116. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v0.5.md +0 -0
  117. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v0.6.md +0 -0
  118. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v0.7.md +0 -0
  119. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v1.0-verify.md +0 -0
  120. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/docs/retrospectives/v1.0.md +0 -0
  121. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/.env.example +0 -0
  122. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.auto-custom.yaml +0 -0
  123. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.auto.yaml +0 -0
  124. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.note-2026.yaml +0 -0
  125. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.raspberrypi.yaml +0 -0
  126. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/examples/providers.v2-context-budget.yaml +0 -0
  127. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/demo_traffic.sh +0 -0
  128. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/openrouter_roster_diff.py +0 -0
  129. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/smoke_v2_2.sh +0 -0
  130. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/verify-providers.yaml +0 -0
  131. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/verify_v0_5.sh +0 -0
  132. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/scripts/verify_v1_0.sh +0 -0
  133. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/__init__.py +0 -0
  134. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/conftest.py +0 -0
  135. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_adapter_anthropic.py +0 -0
  136. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_audit_log.py +0 -0
  137. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_auto_router.py +0 -0
  138. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_backend_health.py +0 -0
  139. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_budget.py +0 -0
  140. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_capability.py +0 -0
  141. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_capability_degraded_payload.py +0 -0
  142. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_capability_registry.py +0 -0
  143. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_capability_registry_cache_control.py +0 -0
  144. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_claude_code_suitability.py +0 -0
  145. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_cli.py +0 -0
  146. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_cli_stats.py +0 -0
  147. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_config.py +0 -0
  148. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_context_budget.py +0 -0
  149. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_continuous_probe.py +0 -0
  150. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_dashboard_endpoint.py +0 -0
  151. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_doctor.py +0 -0
  152. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_doctor_apply.py +0 -0
  153. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_doctor_cache_probe.py +0 -0
  154. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_drift_actions.py +0 -0
  155. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_drift_detection.py +0 -0
  156. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_drift_detection_integration.py +0 -0
  157. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_env_file.py +0 -0
  158. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_env_security.py +0 -0
  159. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_errors.py +0 -0
  160. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback.py +0 -0
  161. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback_anthropic.py +0 -0
  162. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback_cache_control.py +0 -0
  163. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback_cache_observed.py +0 -0
  164. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback_misconfig_warn.py +0 -0
  165. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback_paid_gate.py +0 -0
  166. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_fallback_thinking.py +0 -0
  167. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_guards_tool_loop.py +0 -0
  168. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_ingress_anthropic.py +0 -0
  169. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_ingress_profile.py +0 -0
  170. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_memory_pressure.py +0 -0
  171. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_cache.py +0 -0
  172. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_collector.py +0 -0
  173. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_cost.py +0 -0
  174. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_endpoint.py +0 -0
  175. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_jsonl.py +0 -0
  176. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_prometheus.py +0 -0
  177. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_metrics_prometheus_cache.py +0 -0
  178. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_openai_compat.py +0 -0
  179. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_openrouter_roster_diff.py +0 -0
  180. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_output_filters.py +0 -0
  181. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_output_filters_adapters.py +0 -0
  182. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_partial_stitch.py +0 -0
  183. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_plugins_integration.py +0 -0
  184. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_plugins_loader.py +0 -0
  185. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_plugins_registry.py +0 -0
  186. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_reasoning_strip.py +0 -0
  187. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_request_log.py +0 -0
  188. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_routing_adaptive.py +0 -0
  189. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_self_healing.py +0 -0
  190. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_state_store.py +0 -0
  191. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_token_estimation.py +0 -0
  192. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_tool_repair.py +0 -0
  193. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_translation_anthropic.py +0 -0
  194. {coderouter_cli-2.4.0 → coderouter_cli-2.5.1}/tests/test_translation_reverse.py +0 -0
@@ -6,6 +6,86 @@ versioning follows [SemVer](https://semver.org/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [v2.5.1] — 2026-05-22 (MLX backend + docs reorganization)
10
+
11
+ Patch release: a third Launcher backend, a reorganized documentation
12
+ tree, and a security fix.
13
+
14
+ ### Added
15
+
16
+ - **MLX backend** for the Launcher (`launcher_gui.py` and
17
+ `coderouter/ingress/launcher_routes.py`): `mlx` joins `llama.cpp` and
18
+ `vllm`, aimed at Apple Silicon users. Launches
19
+ `python -m mlx_lm.server --model <m> --port <p>`. The backend
20
+ selectors (desktop GUI combobox / Web `<select>`) gain an `mlx`
21
+ option, and the binary-not-found error messages are now
22
+ backend-agnostic.
23
+
24
+ ### Changed
25
+
26
+ - **`docs/` reorganized** into role-based folders — `start/`, `guides/`,
27
+ `backends/`, `concepts/` — with a new bilingual (JA/EN) master index
28
+ at `docs/README.md` including a quick "what to read" table. Internal
29
+ cross-links, `README.md` / `README.en.md`, and code/config path
30
+ references were updated to the new layout.
31
+ - **`plan.md` restructured**: deduplicated, version ordering fixed,
32
+ sections compressed (1747 → 721 lines).
33
+
34
+ ### Security
35
+
36
+ - **starlette `1.0.0` → `1.0.1`** (`uv.lock`): fixes PYSEC-2026-161,
37
+ which failed the `cve-audit` CI job.
38
+
39
+ ---
40
+
41
+ ## [v2.5.0] — 2026-05-22 (Launcher — llama.cpp / vllm GUI)
42
+
43
+ Browser-based process manager for local inference backends, integrated
44
+ into the existing CodeRouter web UI at `/launcher`.
45
+
46
+ ### Added
47
+
48
+ - **`coderouter/ingress/launcher_routes.py`**: New route module providing
49
+ the Launcher UI and its backing API.
50
+
51
+ - `GET /launcher` — Single-page HTML UI (Tailwind CDN + inline JS,
52
+ same dark-theme aesthetic as `/dashboard`).
53
+ - `GET /api/launcher/models` — Recursively scans `launcher.model_dirs`
54
+ and returns discovered model files with name, path, size (GB), and
55
+ extension.
56
+ - `GET /api/launcher/option-profiles` — Returns named option presets
57
+ from `providers.yaml` keyed by backend (`llama.cpp`, `vllm`).
58
+ - `GET /api/launcher/processes` — Lists all managed processes.
59
+ - `POST /api/launcher/start` — Starts a backend process. Accepts name,
60
+ backend, model_path, port, options dict, and extra_args free-text.
61
+ - `POST /api/launcher/stop/{id}` — SIGTERM → SIGKILL (5 s timeout).
62
+ - `DELETE /api/launcher/processes/{id}` — Removes a stopped process.
63
+ - `GET /api/launcher/logs/{id}` — Returns last N lines from the
64
+ process's 200-line stdout/stderr ring buffer.
65
+
66
+ - **`LauncherOptionProfile` / `LauncherConfig`** (`config/schemas.py`):
67
+ New Pydantic models for the `launcher:` block in `providers.yaml`.
68
+ Adding new CLI flags requires only a YAML edit — no code change.
69
+
70
+ - **`launcher_profiles.yaml.example`**: Template with 7 llama.cpp
71
+ presets and 7 vllm presets. For GitHub distribution and community
72
+ profile contributions.
73
+
74
+ - **`/dashboard` header**: Added a "Launcher" navigation link.
75
+
76
+ ### Design notes
77
+
78
+ - **YAML-driven**: option profiles live entirely in `providers.yaml`.
79
+ No code changes needed to add new backend flags.
80
+ - **Multi-process**: each launched process gets a UUID-based ID and is
81
+ tracked independently. llama.cpp and vllm can run side by side.
82
+ - **Zero new dependencies**: uses `asyncio.create_subprocess_exec`
83
+ (stdlib only). The 5-dep invariant is maintained.
84
+ - **In-memory registry**: does not persist across CodeRouter restarts
85
+ (intentional — avoids zombie GPU allocations on restart).
86
+
87
+ ---
88
+
9
89
  ## [v2.4.0] — 2026-05-15 (Goal-session awareness — P1-4/5/6)
10
90
 
11
91
  Stable release following v2.3.0a4. Promotes the Plugin SDK to stable,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coderouter-cli
3
- Version: 2.4.0
3
+ Version: 2.5.1
4
4
  Summary: Local-first, free-first, fallback-built-in LLM router. Claude Code / OpenAI compatible.
5
5
  Project-URL: Homepage, https://github.com/zephel01/CodeRouter
6
6
  Project-URL: Repository, https://github.com/zephel01/CodeRouter
@@ -54,7 +54,7 @@ Description-Content-Type: text/markdown
54
54
  </p>
55
55
 
56
56
  <p align="center">
57
- <a href="./README.en.md">English</a> · <strong>日本語</strong> · <a href="./docs/quickstart.md">10 分で動かす</a> · <a href="./docs/architecture.md">設計詳細</a>
57
+ <a href="./README.en.md">English</a> · <strong>日本語</strong> · <a href="./docs/start/quickstart.md">10 分で動かす</a> · <a href="./docs/concepts/architecture.md">設計詳細</a>
58
58
  </p>
59
59
 
60
60
  ---
@@ -121,7 +121,7 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
121
121
  | codex / gemini-cli + Ollama 直繋ぎで動いてる | オプション — フォールバックが欲しいなら |
122
122
  | Claude API を直接叩いてて問題ない | 不要 |
123
123
 
124
- 詳細は → [要否判定ガイド](./docs/when-do-i-need-coderouter.md)
124
+ 詳細は → [要否判定ガイド](./docs/start/when-do-i-need-coderouter.md)
125
125
 
126
126
  ---
127
127
 
@@ -141,7 +141,7 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
141
141
  | ガード | 何から守るか |
142
142
  |---|---|
143
143
  | **Context Budget** | メッセージが溜まりすぎて context window 溢れ → 自動 trim |
144
- | **Drift Detection** | モデルの応答品質が徐々に劣化 → 別 provider に切替 or KV cache flush |
144
+ | **Drift Detection** | モデルの応答品質が徐々に劣化 → 別 provider に切替 or KV cache flush (6 シグナル、`goal_mode` で目標達成停滞も検知) |
145
145
  | **Self-healing** | backend が落ちた → 自動除外 + restart + 回復 probe で自動復帰 |
146
146
  | **Tool Loop Guard** | 同じツールを無限に呼び続ける → 検知して停止 |
147
147
  | **Memory Pressure** | GPU メモリ不足を検知 → 軽量モデルに切替 |
@@ -154,9 +154,40 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
154
154
  | **`coderouter doctor`** | プロバイダの問題を 6 プローブで即診断 + 修正パッチ出力 |
155
155
  | **`/dashboard`** | ブラウザで今何が起きてるかリアルタイム確認 |
156
156
  | **`coderouter audit`** | guard 発火履歴を検索 |
157
- | **`coderouter replay`** | provider 切替の効果を統計比較 (A/B 分析) |
157
+ | **`coderouter replay`** | provider 切替の効果を統計比較 (A/B 分析) / `--suggest-rules` でルール最適化提案 |
158
158
  | **Continuous Probe** | idle 時も定期的に backend を監視 |
159
159
 
160
+ ### Launcher — llama.cpp / vllm 起動 UI
161
+
162
+ `http://localhost:8088/launcher` で開けるブラウザ UI。llama.cpp や vllm を GUI で起動・管理できます。
163
+
164
+ | 機能 | 詳細 |
165
+ |---|---|
166
+ | **モデルスキャン** | `model_dirs` に指定したフォルダを再帰スキャンして `.gguf` / `.safetensors` をリスト化 |
167
+ | **オプションプロファイル** | `providers.yaml` に名前付きプリセットを定義 → ドロップダウンで選択するだけ |
168
+ | **複数プロセス管理** | llama.cpp と vllm を同時に起動し、ポートごとに独立管理 |
169
+ | **ログビューア** | 各プロセスの stdout/stderr をブラウザ内でリアルタイム確認 |
170
+
171
+ ```yaml
172
+ # providers.yaml に追記するだけで有効になる
173
+ launcher:
174
+ model_dirs:
175
+ - ~/models
176
+ option_profiles:
177
+ llama.cpp:
178
+ - name: "GPU フル活用"
179
+ args:
180
+ "-ngl": 99
181
+ "--ctx-size": 4096
182
+ vllm:
183
+ - name: "標準"
184
+ args:
185
+ "--dtype": "auto"
186
+ "--max-model-len": 4096
187
+ ```
188
+
189
+ 詳細 → [Launcher ガイド](./docs/backends/launcher.md)
190
+
160
191
  ---
161
192
 
162
193
  ## 設定例 (最小)
@@ -182,7 +213,7 @@ providers:
182
213
  api_key_env: OPENROUTER_API_KEY
183
214
  ```
184
215
 
185
- もっと詳しい設定 → [利用ガイド](./docs/usage-guide.md) · [設計詳細](./docs/architecture.md)
216
+ もっと詳しい設定 → [利用ガイド](./docs/guides/usage-guide.md) · [設計詳細](./docs/concepts/architecture.md)
186
217
 
187
218
  ---
188
219
 
@@ -190,14 +221,15 @@ providers:
190
221
 
191
222
  | やりたいこと | ドキュメント |
192
223
  |---|---|
193
- | すぐ動かす | [Quickstart](./docs/quickstart.md) |
194
- | 使いこなす | [利用ガイド](./docs/usage-guide.md) |
195
- | 無料で回す | [無料枠ガイド](./docs/free-tier-guide.md) |
196
- | 詰まった | [トラブルシューティング](./docs/troubleshooting.md) |
197
- | 設計を知りたい | [アーキテクチャ詳細](./docs/architecture.md) |
224
+ | すぐ動かす | [Quickstart](./docs/start/quickstart.md) |
225
+ | 使いこなす | [利用ガイド](./docs/guides/usage-guide.md) |
226
+ | 無料で回す | [無料枠ガイド](./docs/guides/free-tier-guide.md) |
227
+ | llama.cpp / vllm を GUI で起動 | [Launcher ガイド](./docs/backends/launcher.md) |
228
+ | 詰まった | [トラブルシューティング](./docs/guides/troubleshooting.md) |
229
+ | 設計を知りたい | [アーキテクチャ詳細](./docs/concepts/architecture.md) |
198
230
  | 全リリース履歴 | [CHANGELOG](./CHANGELOG.md) |
199
231
 
200
- English: [Quickstart](./docs/quickstart.en.md) · [Usage guide](./docs/usage-guide.en.md) · [Free-tier](./docs/free-tier-guide.en.md) · [Troubleshooting](./docs/troubleshooting.en.md)
232
+ English: [Quickstart](./docs/start/quickstart.en.md) · [Usage guide](./docs/guides/usage-guide.en.md) · [Free-tier](./docs/guides/free-tier-guide.en.md) · [Troubleshooting](./docs/guides/troubleshooting.en.md)
201
233
 
202
234
  ---
203
235
 
@@ -207,10 +239,10 @@ English: [Quickstart](./docs/quickstart.en.md) · [Usage guide](./docs/usage-gui
207
239
 
208
240
  | 症状 | 原因 | 詳細 |
209
241
  |---|---|---|
210
- | 401 エラー | API キー未設定 / `.env` に `export` 忘れ | [§1](./docs/troubleshooting.md#1-起動設定で踏みやすい-5-つの罠-v162-追加) |
211
- | 返信が空 / 意味不明 | Ollama の `num_ctx` が 2048 に切り詰め | [§3](./docs/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
212
- | `<think>` タグが漏れる | `output_filters: [strip_thinking]` を付ける | [§3](./docs/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
213
- | Claude Code でツール呼び出しがおかしい | tool-call 修復が効いてない | [§4](./docs/troubleshooting.md#4-claude-code-連携で踏みやすい罠-v162-追加) |
242
+ | 401 エラー | API キー未設定 / `.env` に `export` 忘れ | [§1](./docs/guides/troubleshooting.md#1-起動設定で踏みやすい-5-つの罠-v162-追加) |
243
+ | 返信が空 / 意味不明 | Ollama の `num_ctx` が 2048 に切り詰め | [§3](./docs/guides/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
244
+ | `<think>` タグが漏れる | `output_filters: [strip_thinking]` を付ける | [§3](./docs/guides/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
245
+ | Claude Code でツール呼び出しがおかしい | tool-call 修復が効いてない | [§4](./docs/guides/troubleshooting.md#4-claude-code-連携で踏みやすい罠-v162-追加) |
214
246
 
215
247
  `http://localhost:8088/dashboard` を開いておくと、ほとんどの問題が見て 10 秒でわかります。
216
248
 
@@ -236,7 +268,7 @@ CodeRouter は backend ルーター層として独立して動きます。`OPENA
236
268
 
237
269
  ## Security
238
270
 
239
- シークレットは環境変数に置きます。[`docs/security.md`](./docs/security.md) に完全な方針と報告手順があります。
271
+ シークレットは環境変数に置きます。[`docs/security.md`](./docs/guides/security.md) に完全な方針と報告手順があります。
240
272
 
241
273
  ## License
242
274
 
@@ -13,7 +13,7 @@
13
13
  </p>
14
14
 
15
15
  <p align="center">
16
- <strong>English</strong> · <a href="./README.md">日本語</a> · <a href="./docs/quickstart.en.md">Get started in 10 min</a> · <a href="./docs/architecture.md">Architecture</a>
16
+ <strong>English</strong> · <a href="./README.md">日本語</a> · <a href="./docs/start/quickstart.en.md">Get started in 10 min</a> · <a href="./docs/concepts/architecture.md">Architecture</a>
17
17
  </p>
18
18
 
19
19
  ---
@@ -80,7 +80,7 @@ That's it. Claude Code works as usual, but your local Ollama is answering behind
80
80
  | codex / gemini-cli + Ollama works fine | Optional — if you want fallback |
81
81
  | Using Claude API directly, no issues | Not needed |
82
82
 
83
- Full decision matrix → [Do I need CodeRouter?](./docs/when-do-i-need-coderouter.en.md)
83
+ Full decision matrix → [Do I need CodeRouter?](./docs/start/when-do-i-need-coderouter.en.md)
84
84
 
85
85
  ---
86
86
 
@@ -100,7 +100,7 @@ Full decision matrix → [Do I need CodeRouter?](./docs/when-do-i-need-coderoute
100
100
  | Guard | What it protects against |
101
101
  |---|---|
102
102
  | **Context Budget** | Messages piling up → context window overflow. Auto-trim at 90% |
103
- | **Drift Detection** | Model quality degrading over time → switch provider or flush KV cache |
103
+ | **Drift Detection** | Model quality degrading over time → switch provider or flush KV cache (6 signals incl. `goal_progress_stall`; `goal_mode` for tighter thresholds) |
104
104
  | **Self-healing** | Backend crashes → auto-exclude + restart + recovery probe → auto-restore |
105
105
  | **Tool Loop Guard** | Agent calling the same tool forever → detect and break |
106
106
  | **Memory Pressure** | GPU running out of VRAM → switch to lighter model |
@@ -113,9 +113,40 @@ Full decision matrix → [Do I need CodeRouter?](./docs/when-do-i-need-coderoute
113
113
  | **`coderouter doctor`** | 6-probe diagnosis of provider issues + copy-paste YAML patches |
114
114
  | **`/dashboard`** | Real-time browser view of what's happening |
115
115
  | **`coderouter audit`** | Search guard activation history |
116
- | **`coderouter replay`** | Compare providers statistically (A/B analysis) |
116
+ | **`coderouter replay`** | Compare providers statistically (A/B analysis) / `--suggest-rules` for automated rule suggestions |
117
117
  | **Continuous Probe** | Background health monitoring even during idle |
118
118
 
119
+ ### Launcher — llama.cpp / vllm GUI
120
+
121
+ Browser UI at `http://localhost:8088/launcher` for starting and managing local inference backends.
122
+
123
+ | Feature | Detail |
124
+ |---|---|
125
+ | **Model scanner** | Recursively scans `model_dirs` for `.gguf` / `.safetensors` and lists them |
126
+ | **Option profiles** | Name your flag presets in `providers.yaml` — select from a dropdown, no CLI needed |
127
+ | **Multi-process** | Run llama.cpp and vllm side by side on different ports |
128
+ | **Log viewer** | stdout/stderr of each process shown live in the browser |
129
+
130
+ ```yaml
131
+ # Add to providers.yaml — no code changes needed
132
+ launcher:
133
+ model_dirs:
134
+ - ~/models
135
+ option_profiles:
136
+ llama.cpp:
137
+ - name: "Full GPU"
138
+ args:
139
+ "-ngl": 99
140
+ "--ctx-size": 4096
141
+ vllm:
142
+ - name: "Standard"
143
+ args:
144
+ "--dtype": "auto"
145
+ "--max-model-len": 4096
146
+ ```
147
+
148
+ Details → [Launcher guide](./docs/backends/launcher.md)
149
+
119
150
  ---
120
151
 
121
152
  ## Minimal Config
@@ -141,7 +172,7 @@ providers:
141
172
  api_key_env: OPENROUTER_API_KEY
142
173
  ```
143
174
 
144
- More detail → [Usage guide](./docs/usage-guide.en.md) · [Architecture](./docs/architecture.md)
175
+ More detail → [Usage guide](./docs/guides/usage-guide.en.md) · [Architecture](./docs/concepts/architecture.md)
145
176
 
146
177
  ---
147
178
 
@@ -149,14 +180,15 @@ More detail → [Usage guide](./docs/usage-guide.en.md) · [Architecture](./docs
149
180
 
150
181
  | Goal | Document |
151
182
  |---|---|
152
- | Get running fast | [Quickstart](./docs/quickstart.en.md) |
153
- | Use it well | [Usage guide](./docs/usage-guide.en.md) |
154
- | Run for free | [Free-tier guide](./docs/free-tier-guide.en.md) |
155
- | Stuck? | [Troubleshooting](./docs/troubleshooting.en.md) |
156
- | Understand the design | [Architecture](./docs/architecture.md) |
183
+ | Get running fast | [Quickstart](./docs/start/quickstart.en.md) |
184
+ | Use it well | [Usage guide](./docs/guides/usage-guide.en.md) |
185
+ | Run for free | [Free-tier guide](./docs/guides/free-tier-guide.en.md) |
186
+ | Launch llama.cpp / vllm via GUI | [Launcher guide](./docs/backends/launcher.md) |
187
+ | Stuck? | [Troubleshooting](./docs/guides/troubleshooting.en.md) |
188
+ | Understand the design | [Architecture](./docs/concepts/architecture.md) |
157
189
  | Full release history | [CHANGELOG](./CHANGELOG.md) |
158
190
 
159
- 日本語: [Quickstart](./docs/quickstart.md) · [利用ガイド](./docs/usage-guide.md) · [無料枠ガイド](./docs/free-tier-guide.md) · [トラブルシューティング](./docs/troubleshooting.md)
191
+ 日本語: [Quickstart](./docs/start/quickstart.md) · [利用ガイド](./docs/guides/usage-guide.md) · [無料枠ガイド](./docs/guides/free-tier-guide.md) · [トラブルシューティング](./docs/guides/troubleshooting.md)
160
192
 
161
193
  ---
162
194
 
@@ -166,10 +198,10 @@ More detail → [Usage guide](./docs/usage-guide.en.md) · [Architecture](./docs
166
198
 
167
199
  | Symptom | Cause | Details |
168
200
  |---|---|---|
169
- | 401 error | API key not set / missing `export` in `.env` | [§1](./docs/troubleshooting.en.md#1-five-startup--config-gotchas-added-in-v162) |
170
- | Empty / garbage replies | Ollama `num_ctx` truncated to 2048 | [§3](./docs/troubleshooting.en.md#3-ollama-beginner--5-silent-fail-symptoms-v07-c) |
171
- | `<think>` tags leaking | Add `output_filters: [strip_thinking]` | [§3](./docs/troubleshooting.en.md#3-ollama-beginner--5-silent-fail-symptoms-v07-c) |
172
- | Tool calls misbehaving in Claude Code | Tool-call repair not kicking in | [§4](./docs/troubleshooting.en.md#4-claude-code-integration-gotchas-added-in-v162) |
201
+ | 401 error | API key not set / missing `export` in `.env` | [§1](./docs/guides/troubleshooting.en.md#1-five-startup--config-gotchas-added-in-v162) |
202
+ | Empty / garbage replies | Ollama `num_ctx` truncated to 2048 | [§3](./docs/guides/troubleshooting.en.md#3-ollama-beginner--5-silent-fail-symptoms-v07-c) |
203
+ | `<think>` tags leaking | Add `output_filters: [strip_thinking]` | [§3](./docs/guides/troubleshooting.en.md#3-ollama-beginner--5-silent-fail-symptoms-v07-c) |
204
+ | Tool calls misbehaving in Claude Code | Tool-call repair not kicking in | [§4](./docs/guides/troubleshooting.en.md#4-claude-code-integration-gotchas-added-in-v162) |
173
205
 
174
206
  Open `http://localhost:8088/dashboard` while debugging — most issues become visible in 10 seconds.
175
207
 
@@ -195,7 +227,7 @@ CodeRouter runs as an independent backend router layer. Point any project's `OPE
195
227
 
196
228
  ## Security
197
229
 
198
- Secrets go in env vars, not config files. See [`docs/security.en.md`](./docs/security.en.md) for the full policy and reporting instructions.
230
+ Secrets go in env vars, not config files. See [`docs/security.en.md`](./docs/guides/security.en.md) for the full policy and reporting instructions.
199
231
 
200
232
  ## License
201
233
 
@@ -13,7 +13,7 @@
13
13
  </p>
14
14
 
15
15
  <p align="center">
16
- <a href="./README.en.md">English</a> · <strong>日本語</strong> · <a href="./docs/quickstart.md">10 分で動かす</a> · <a href="./docs/architecture.md">設計詳細</a>
16
+ <a href="./README.en.md">English</a> · <strong>日本語</strong> · <a href="./docs/start/quickstart.md">10 分で動かす</a> · <a href="./docs/concepts/architecture.md">設計詳細</a>
17
17
  </p>
18
18
 
19
19
  ---
@@ -80,7 +80,7 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
80
80
  | codex / gemini-cli + Ollama 直繋ぎで動いてる | オプション — フォールバックが欲しいなら |
81
81
  | Claude API を直接叩いてて問題ない | 不要 |
82
82
 
83
- 詳細は → [要否判定ガイド](./docs/when-do-i-need-coderouter.md)
83
+ 詳細は → [要否判定ガイド](./docs/start/when-do-i-need-coderouter.md)
84
84
 
85
85
  ---
86
86
 
@@ -100,7 +100,7 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
100
100
  | ガード | 何から守るか |
101
101
  |---|---|
102
102
  | **Context Budget** | メッセージが溜まりすぎて context window 溢れ → 自動 trim |
103
- | **Drift Detection** | モデルの応答品質が徐々に劣化 → 別 provider に切替 or KV cache flush |
103
+ | **Drift Detection** | モデルの応答品質が徐々に劣化 → 別 provider に切替 or KV cache flush (6 シグナル、`goal_mode` で目標達成停滞も検知) |
104
104
  | **Self-healing** | backend が落ちた → 自動除外 + restart + 回復 probe で自動復帰 |
105
105
  | **Tool Loop Guard** | 同じツールを無限に呼び続ける → 検知して停止 |
106
106
  | **Memory Pressure** | GPU メモリ不足を検知 → 軽量モデルに切替 |
@@ -113,9 +113,40 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
113
113
  | **`coderouter doctor`** | プロバイダの問題を 6 プローブで即診断 + 修正パッチ出力 |
114
114
  | **`/dashboard`** | ブラウザで今何が起きてるかリアルタイム確認 |
115
115
  | **`coderouter audit`** | guard 発火履歴を検索 |
116
- | **`coderouter replay`** | provider 切替の効果を統計比較 (A/B 分析) |
116
+ | **`coderouter replay`** | provider 切替の効果を統計比較 (A/B 分析) / `--suggest-rules` でルール最適化提案 |
117
117
  | **Continuous Probe** | idle 時も定期的に backend を監視 |
118
118
 
119
+ ### Launcher — llama.cpp / vllm 起動 UI
120
+
121
+ `http://localhost:8088/launcher` で開けるブラウザ UI。llama.cpp や vllm を GUI で起動・管理できます。
122
+
123
+ | 機能 | 詳細 |
124
+ |---|---|
125
+ | **モデルスキャン** | `model_dirs` に指定したフォルダを再帰スキャンして `.gguf` / `.safetensors` をリスト化 |
126
+ | **オプションプロファイル** | `providers.yaml` に名前付きプリセットを定義 → ドロップダウンで選択するだけ |
127
+ | **複数プロセス管理** | llama.cpp と vllm を同時に起動し、ポートごとに独立管理 |
128
+ | **ログビューア** | 各プロセスの stdout/stderr をブラウザ内でリアルタイム確認 |
129
+
130
+ ```yaml
131
+ # providers.yaml に追記するだけで有効になる
132
+ launcher:
133
+ model_dirs:
134
+ - ~/models
135
+ option_profiles:
136
+ llama.cpp:
137
+ - name: "GPU フル活用"
138
+ args:
139
+ "-ngl": 99
140
+ "--ctx-size": 4096
141
+ vllm:
142
+ - name: "標準"
143
+ args:
144
+ "--dtype": "auto"
145
+ "--max-model-len": 4096
146
+ ```
147
+
148
+ 詳細 → [Launcher ガイド](./docs/backends/launcher.md)
149
+
119
150
  ---
120
151
 
121
152
  ## 設定例 (最小)
@@ -141,7 +172,7 @@ providers:
141
172
  api_key_env: OPENROUTER_API_KEY
142
173
  ```
143
174
 
144
- もっと詳しい設定 → [利用ガイド](./docs/usage-guide.md) · [設計詳細](./docs/architecture.md)
175
+ もっと詳しい設定 → [利用ガイド](./docs/guides/usage-guide.md) · [設計詳細](./docs/concepts/architecture.md)
145
176
 
146
177
  ---
147
178
 
@@ -149,14 +180,15 @@ providers:
149
180
 
150
181
  | やりたいこと | ドキュメント |
151
182
  |---|---|
152
- | すぐ動かす | [Quickstart](./docs/quickstart.md) |
153
- | 使いこなす | [利用ガイド](./docs/usage-guide.md) |
154
- | 無料で回す | [無料枠ガイド](./docs/free-tier-guide.md) |
155
- | 詰まった | [トラブルシューティング](./docs/troubleshooting.md) |
156
- | 設計を知りたい | [アーキテクチャ詳細](./docs/architecture.md) |
183
+ | すぐ動かす | [Quickstart](./docs/start/quickstart.md) |
184
+ | 使いこなす | [利用ガイド](./docs/guides/usage-guide.md) |
185
+ | 無料で回す | [無料枠ガイド](./docs/guides/free-tier-guide.md) |
186
+ | llama.cpp / vllm を GUI で起動 | [Launcher ガイド](./docs/backends/launcher.md) |
187
+ | 詰まった | [トラブルシューティング](./docs/guides/troubleshooting.md) |
188
+ | 設計を知りたい | [アーキテクチャ詳細](./docs/concepts/architecture.md) |
157
189
  | 全リリース履歴 | [CHANGELOG](./CHANGELOG.md) |
158
190
 
159
- English: [Quickstart](./docs/quickstart.en.md) · [Usage guide](./docs/usage-guide.en.md) · [Free-tier](./docs/free-tier-guide.en.md) · [Troubleshooting](./docs/troubleshooting.en.md)
191
+ English: [Quickstart](./docs/start/quickstart.en.md) · [Usage guide](./docs/guides/usage-guide.en.md) · [Free-tier](./docs/guides/free-tier-guide.en.md) · [Troubleshooting](./docs/guides/troubleshooting.en.md)
160
192
 
161
193
  ---
162
194
 
@@ -166,10 +198,10 @@ English: [Quickstart](./docs/quickstart.en.md) · [Usage guide](./docs/usage-gui
166
198
 
167
199
  | 症状 | 原因 | 詳細 |
168
200
  |---|---|---|
169
- | 401 エラー | API キー未設定 / `.env` に `export` 忘れ | [§1](./docs/troubleshooting.md#1-起動設定で踏みやすい-5-つの罠-v162-追加) |
170
- | 返信が空 / 意味不明 | Ollama の `num_ctx` が 2048 に切り詰め | [§3](./docs/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
171
- | `<think>` タグが漏れる | `output_filters: [strip_thinking]` を付ける | [§3](./docs/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
172
- | Claude Code でツール呼び出しがおかしい | tool-call 修復が効いてない | [§4](./docs/troubleshooting.md#4-claude-code-連携で踏みやすい罠-v162-追加) |
201
+ | 401 エラー | API キー未設定 / `.env` に `export` 忘れ | [§1](./docs/guides/troubleshooting.md#1-起動設定で踏みやすい-5-つの罠-v162-追加) |
202
+ | 返信が空 / 意味不明 | Ollama の `num_ctx` が 2048 に切り詰め | [§3](./docs/guides/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
203
+ | `<think>` タグが漏れる | `output_filters: [strip_thinking]` を付ける | [§3](./docs/guides/troubleshooting.md#3-ollama-初心者--サイレント失敗-5-症状-v07-c) |
204
+ | Claude Code でツール呼び出しがおかしい | tool-call 修復が効いてない | [§4](./docs/guides/troubleshooting.md#4-claude-code-連携で踏みやすい罠-v162-追加) |
173
205
 
174
206
  `http://localhost:8088/dashboard` を開いておくと、ほとんどの問題が見て 10 秒でわかります。
175
207
 
@@ -195,7 +227,7 @@ CodeRouter は backend ルーター層として独立して動きます。`OPENA
195
227
 
196
228
  ## Security
197
229
 
198
- シークレットは環境変数に置きます。[`docs/security.md`](./docs/security.md) に完全な方針と報告手順があります。
230
+ シークレットは環境変数に置きます。[`docs/security.md`](./docs/guides/security.md) に完全な方針と報告手順があります。
199
231
 
200
232
  ## License
201
233
 
@@ -61,7 +61,7 @@ def _build_parser() -> argparse.ArgumentParser:
61
61
  "binding the server. Repeat to layer multiple files. By "
62
62
  "default, file values do NOT override variables already in "
63
63
  "the environment (the shell `export` wins). See "
64
- "docs/troubleshooting.md §5 for 1Password / direnv / sops "
64
+ "docs/guides/troubleshooting.md §5 for 1Password / direnv / sops "
65
65
  "integration recipes."
66
66
  ),
67
67
  )
@@ -116,7 +116,7 @@ def _build_parser() -> argparse.ArgumentParser:
116
116
  "POSIX file mode (0600 expected), .gitignore coverage, "
117
117
  "and git-tracking state. Bare `--check-env` (no PATH) "
118
118
  "looks for `./.env` then `~/.coderouter/.env`. "
119
- "See docs/troubleshooting.md §5 for the threat model."
119
+ "See docs/guides/troubleshooting.md §5 for the threat model."
120
120
  ),
121
121
  )
122
122
  doctor.add_argument(
@@ -699,8 +699,8 @@ def _run_replay(args: argparse.Namespace) -> int:
699
699
  if getattr(args, "suggest_rules", False):
700
700
  # P1-6: statistical rule suggestion mode.
701
701
  # Always compute a full window summary (ignores --compare / --provider).
702
- from coderouter.state.suggest_rules import format_suggestions, suggest_rules
703
702
  from coderouter.state.replay import summarize_window as _sw
703
+ from coderouter.state.suggest_rules import format_suggestions, suggest_rules
704
704
 
705
705
  # Re-read without provider filter so we see all providers.
706
706
  all_entries = read_request_log(log_path, since=args.since)
@@ -109,7 +109,7 @@ class RegistryCapabilities(BaseModel):
109
109
  "harness. ``degraded`` = the model over-eagerly invokes "
110
110
  "tools/skills when given Claude Code's system prompt — e.g. "
111
111
  "Llama-3.3-70B treating small talk like ``こんにちは`` as "
112
- "``Skill(hello)`` invocations (see docs/troubleshooting.md "
112
+ "``Skill(hello)`` invocations (see docs/guides/troubleshooting.md "
113
113
  "§4-1 for the symptom log). ``ok`` = explicitly verified "
114
114
  "clean. ``None`` = no opinion (treated as ``ok`` at the "
115
115
  "startup check)."
@@ -874,6 +874,130 @@ class AutoRouterConfig(BaseModel):
874
874
  )
875
875
 
876
876
 
877
+ class LauncherBackendConfig(BaseModel):
878
+ """Per-backend binary path configuration for the Launcher.
879
+
880
+ When ``binary`` is unset, the Launcher falls back to the default
881
+ executable name (``llama-server`` for llama.cpp, ``python`` for vllm)
882
+ and relies on ``$PATH`` resolution — which works when the tool is
883
+ globally installed. Set ``binary`` when:
884
+
885
+ - llama.cpp was built from source (e.g. ``~/llama.cpp/build/bin/llama-server``)
886
+ - vllm lives in a virtualenv (e.g. ``~/.venv/bin/python``)
887
+ - Multiple builds coexist and you want to pin a specific one
888
+
889
+ Tilde (``~``) and environment variables are expanded at launch time.
890
+
891
+ Example::
892
+
893
+ backends:
894
+ llama.cpp:
895
+ binary: ~/llama.cpp/build/bin/llama-server
896
+ vllm:
897
+ binary: ~/.venv/bin/python
898
+ """
899
+
900
+ model_config = ConfigDict(extra="forbid")
901
+
902
+ binary: str | None = Field(
903
+ default=None,
904
+ description=(
905
+ "Absolute or ``~``-relative path to the backend executable. "
906
+ "llama.cpp default: ``llama-server`` (PATH). "
907
+ "vllm default: ``python`` (PATH). "
908
+ "Expanded at launch time."
909
+ ),
910
+ )
911
+
912
+
913
+ class LauncherOptionProfile(BaseModel):
914
+ """One named option preset for a launcher backend (e.g. llama.cpp / vllm).
915
+
916
+ ``args`` maps CLI flag strings to their values. A bool value of
917
+ ``True`` means "include the flag without a value" (e.g. ``--no-mmap``);
918
+ ``False`` means "omit the flag entirely". All other value types are
919
+ converted to strings and appended as ``--flag value`` pairs.
920
+
921
+ Example::
922
+
923
+ name: "GPU速度重視"
924
+ args:
925
+ "-ngl": 99
926
+ "--ctx-size": 4096
927
+ "--no-mmap": false
928
+ """
929
+
930
+ model_config = ConfigDict(extra="forbid")
931
+
932
+ name: str = Field(..., description="Display name shown in the Launcher UI dropdown.")
933
+ args: dict[str, str | int | float | bool] = Field(
934
+ default_factory=dict,
935
+ description=(
936
+ "CLI flag → value mapping. "
937
+ "bool True = flag only (no value). "
938
+ "bool False = omit flag. "
939
+ "All other types are stringified and passed as '--flag value'."
940
+ ),
941
+ )
942
+
943
+
944
+ class LauncherConfig(BaseModel):
945
+ """The ``launcher:`` block in providers.yaml.
946
+
947
+ Controls the Launcher UI available at ``/launcher``.
948
+
949
+ Example::
950
+
951
+ launcher:
952
+ model_dirs:
953
+ - ~/models
954
+ - /data/gguf
955
+ option_profiles:
956
+ llama.cpp:
957
+ - name: "GPU速度重視"
958
+ args:
959
+ "-ngl": 99
960
+ "--ctx-size": 4096
961
+ vllm:
962
+ - name: "標準"
963
+ args:
964
+ "--dtype": "auto"
965
+ "--max-model-len": 4096
966
+ """
967
+
968
+ model_config = ConfigDict(extra="forbid")
969
+
970
+ model_dirs: list[str] = Field(
971
+ default_factory=list,
972
+ description=(
973
+ "Directories to scan for model files "
974
+ "(.gguf, .safetensors, .bin, .pt, .ggml). "
975
+ "Paths are expanded (~ and env vars) at scan time, not at load. "
976
+ "Non-existent paths are silently skipped."
977
+ ),
978
+ )
979
+ backends: dict[str, LauncherBackendConfig] = Field(
980
+ default_factory=dict,
981
+ description=(
982
+ "Per-backend binary path overrides. "
983
+ "Keys are backend names ('llama.cpp', 'vllm'). "
984
+ "When a key is absent, the default executable is used "
985
+ "('llama-server' / 'python') and resolved via PATH. "
986
+ "Useful when running a from-source build or a venv-specific binary."
987
+ ),
988
+ )
989
+ option_profiles: dict[str, list[LauncherOptionProfile]] = Field(
990
+ default_factory=dict,
991
+ description=(
992
+ "Named option presets per backend. "
993
+ "Keys should be backend names: 'llama.cpp', 'vllm'. "
994
+ "Each key maps to an ordered list of named presets. "
995
+ "A free-form 'extra args' field is always available in the UI "
996
+ "for one-off overrides without touching this config."
997
+ ),
998
+ )
999
+
1000
+
877
1001
  class PluginsConfig(BaseModel):
878
1002
  """The ``plugins:`` block in providers.yaml (v2.3.0).
879
1003
 
@@ -1082,6 +1206,17 @@ class CodeRouterConfig(BaseModel):
1082
1206
  "plugins (zero-cost, backward-compatible default)."
1083
1207
  ),
1084
1208
  )
1209
+ launcher: LauncherConfig | None = Field(
1210
+ default=None,
1211
+ description=(
1212
+ "Launcher configuration for the /launcher UI. "
1213
+ "Defines model_dirs to scan and option_profiles per backend "
1214
+ "('llama.cpp', 'vllm'). "
1215
+ "Unset (None) = Launcher UI shows empty model list and no profiles. "
1216
+ "The Launcher UI itself is always available at /launcher "
1217
+ "regardless of this setting."
1218
+ ),
1219
+ )
1085
1220
 
1086
1221
  @model_validator(mode="after")
1087
1222
  def _check_default_profile_exists(self) -> CodeRouterConfig: