coderouter-cli 2.17.0__py3-none-any.whl → 2.19.0__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/adapters/anthropic_native.py +4 -0
- coderouter/adapters/base.py +3 -0
- coderouter/adapters/openai_compat.py +6 -0
- coderouter/adapters/slot_affinity.py +54 -0
- coderouter/cli.py +2 -1
- coderouter/config/schemas.py +36 -1
- coderouter/doctor_claude_code.py +12 -0
- coderouter/ingress/anthropic_routes.py +8 -2
- coderouter/ingress/app.py +3 -0
- coderouter/ingress/openai_routes.py +7 -2
- coderouter/ingress/responses_routes.py +269 -0
- coderouter/routing/auto_router.py +46 -2
- coderouter/routing/capability.py +4 -1
- coderouter/translation/anthropic.py +3 -0
- coderouter/translation/convert.py +4 -0
- coderouter/translation/responses.py +686 -0
- coderouter/vscode_init.py +10 -1
- {coderouter_cli-2.17.0.dist-info → coderouter_cli-2.19.0.dist-info}/METADATA +3 -5
- {coderouter_cli-2.17.0.dist-info → coderouter_cli-2.19.0.dist-info}/RECORD +22 -19
- {coderouter_cli-2.17.0.dist-info → coderouter_cli-2.19.0.dist-info}/WHEEL +0 -0
- {coderouter_cli-2.17.0.dist-info → coderouter_cli-2.19.0.dist-info}/entry_points.txt +0 -0
- {coderouter_cli-2.17.0.dist-info → coderouter_cli-2.19.0.dist-info}/licenses/LICENSE +0 -0
coderouter/vscode_init.py
CHANGED
|
@@ -127,16 +127,25 @@ _MANAGED_ENV_KEYS: tuple[str, ...] = (
|
|
|
127
127
|
# is given. Since 2.1.285 Claude Code assumes a 1M window behind a
|
|
128
128
|
# gateway for Opus 4.7+ / Sonnet 5+ / Fable ids, so auto-compaction would
|
|
129
129
|
# wait far past what a local model holds.
|
|
130
|
+
# * ``CLAUDE_CODE_GATEWAY_HINT_HEADERS=1`` (v2.18.0) — makes Claude Code send
|
|
131
|
+
# ``x-claude-code-request-class`` / ``-agent-type`` / ``-compaction`` …, which
|
|
132
|
+
# the auto router's ``request_class`` / ``agent_type`` / ``compaction``
|
|
133
|
+
# matchers read. Harmless when no rule uses them.
|
|
130
134
|
CLAUDE_CODE_ENV_KEYS: tuple[str, ...] = (
|
|
131
135
|
"ENABLE_TOOL_SEARCH",
|
|
132
136
|
"CLAUDE_CODE_AUTO_MODE_SERVER",
|
|
137
|
+
"CLAUDE_CODE_GATEWAY_HINT_HEADERS",
|
|
133
138
|
"CLAUDE_CODE_MAX_CONTEXT_TOKENS",
|
|
134
139
|
)
|
|
135
140
|
|
|
136
141
|
|
|
137
142
|
def claude_code_env(*, max_context_tokens: int | None = None) -> dict[str, str]:
|
|
138
143
|
"""v2.16.0: the Claude Code env vars ``vscode-init`` writes by default."""
|
|
139
|
-
env = {
|
|
144
|
+
env = {
|
|
145
|
+
"ENABLE_TOOL_SEARCH": "false",
|
|
146
|
+
"CLAUDE_CODE_AUTO_MODE_SERVER": "0",
|
|
147
|
+
"CLAUDE_CODE_GATEWAY_HINT_HEADERS": "1",
|
|
148
|
+
}
|
|
140
149
|
if max_context_tokens is not None:
|
|
141
150
|
if max_context_tokens <= 0:
|
|
142
151
|
raise ValueError("max_context_tokens must be positive")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: coderouter-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.19.0
|
|
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
|
|
@@ -66,7 +66,7 @@ Description-Content-Type: text/markdown
|
|
|
66
66
|
## 何ができるか — 30 秒で
|
|
67
67
|
|
|
68
68
|
```
|
|
69
|
-
あなたのエージェント (Claude Code /
|
|
69
|
+
あなたのエージェント (Claude Code / codex / agy)
|
|
70
70
|
│
|
|
71
71
|
▼
|
|
72
72
|
┌─ CodeRouter ─┐
|
|
@@ -76,8 +76,6 @@ Description-Content-Type: text/markdown
|
|
|
76
76
|
└──────────────┘
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
※ 現行の codex CLI は Responses API(`/v1/responses`)専用になったため、CodeRouter 経由ではまだ使えません(対応予定)。直結の代替手順 → [quickstart Pattern B](./docs/start/quickstart.md#pattern-b-codex-cli-で使う)
|
|
80
|
-
|
|
81
79
|
**やってくれること:**
|
|
82
80
|
|
|
83
81
|
- ローカルモデルが壊した tool calling を Claude Code に届く前に修復する
|
|
@@ -147,7 +145,7 @@ ANTHROPIC_BASE_URL=http://localhost:8088 ANTHROPIC_AUTH_TOKEN=dummy claude
|
|
|
147
145
|
| Claude Code + ローカル Ollama で tool calling が壊れる | **必須** — tool 修復 (+ 必要なら wire 変換) |
|
|
148
146
|
| Claude Code + ローカルで長時間回すと止まる | **必須級** — 6 系統ガード + self-healing |
|
|
149
147
|
| Ollama v0.14+ / LM Studio にネイティブ直結で動いてる | **便利** — 直結に無い fallback / ガード / 診断を追加 (passthrough で翻訳ゼロ) |
|
|
150
|
-
| codex / agy + Ollama 直繋ぎで動いてる | オプション — フォールバックが欲しいなら(codex は `/v1/responses`
|
|
148
|
+
| codex / agy + Ollama 直繋ぎで動いてる | オプション — フォールバックが欲しいなら(codex は v2.19.0 の `/v1/responses` 経由) |
|
|
151
149
|
| Claude API を直接叩いてて問題ない | 不要 |
|
|
152
150
|
|
|
153
151
|
詳細は → [要否判定ガイド](./docs/start/when-do-i-need-coderouter.md)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
coderouter/__init__.py,sha256=ghdjPrLtnRzY8fyQ4CJZI1UJKADyNTLtA3G7se8H7Ns,696
|
|
2
2
|
coderouter/__main__.py,sha256=-LCgxJnvgUV240HjQKv7ly-mn2NuKHpC4nCpvTHjeSU,130
|
|
3
|
-
coderouter/cli.py,sha256
|
|
3
|
+
coderouter/cli.py,sha256=qqwMv5dmWU6bq6okgbIK6YuDHPkWYhv5Y3jAXSY44-U,44825
|
|
4
4
|
coderouter/cli_stats.py,sha256=CCjzc1G4hTRHZ2gG1XhxhDpUkJnnl3NXbcbp1T18jpg,29894
|
|
5
5
|
coderouter/cost.py,sha256=32h6uzb4nxh2eA5d2Hn3kD9yJbtis6CFDAbeIy5KRkM,7431
|
|
6
6
|
coderouter/credentials.py,sha256=R_PdrcA941_jJX_U8hxrjPDTCVVzLd4dsw2c00KwAwE,12991
|
|
7
7
|
coderouter/doctor.py,sha256=0EUqKaEw2GaqX6zGKjR-bVDdlmBznFIklSz3yIoQbE0,91969
|
|
8
8
|
coderouter/doctor_apply.py,sha256=tZT3bEd1G6t67YRhf1TGY4NlSvZuJJbnEqN-3AKy8Hc,29972
|
|
9
|
-
coderouter/doctor_claude_code.py,sha256=
|
|
9
|
+
coderouter/doctor_claude_code.py,sha256=DuG4abNQWigo0IlJQJWHYGJ0lsu2oL3cNek4DvAYPXA,7091
|
|
10
10
|
coderouter/env_security.py,sha256=FEBZnXfJ0xE39kmMMn39zk0W_DRRnmcB_REmP9f4xWo,14796
|
|
11
11
|
coderouter/errors.py,sha256=Xmq67lheyw8iv3Ox39jh2c4tvNI5RcUR4QkoxVDN6l4,1130
|
|
12
12
|
coderouter/gguf_introspect.py,sha256=Scu0JjUfLHj7T7TL0HQIm1AZcGYrXsjkaMMSN9HkTro,16121
|
|
@@ -21,17 +21,18 @@ coderouter/rollback.py,sha256=Bqxx1MALTDLYc0BtGMEMqRyiZIWFoAZJH_RBQw-M5ow,7675
|
|
|
21
21
|
coderouter/secret_redaction.py,sha256=Rg71gqKN6jnybZ6UvCvXIvnThI9uRBvmOqC2grSUSUk,23159
|
|
22
22
|
coderouter/token_estimation.py,sha256=7klQYA4FIg1vtjQGWAhwiBhiLwyz8KTetrLVXFJLGIc,16957
|
|
23
23
|
coderouter/token_estimation_accurate.py,sha256=GTfzrBVnvAGjeVzmzAeUdOYZvWZKLAxcxPpFiJGlzjk,4609
|
|
24
|
-
coderouter/vscode_init.py,sha256=
|
|
24
|
+
coderouter/vscode_init.py,sha256=eSkp2mOLhwCbv8EUdZ8Bkb3K2wMkjgHBCzVfZl7-MWo,36316
|
|
25
25
|
coderouter/adapters/__init__.py,sha256=7dIDSZ-FE_0iSqLSDc_lK1idRdLTKcM2hP9tCJipgPI,463
|
|
26
|
-
coderouter/adapters/anthropic_native.py,sha256=
|
|
27
|
-
coderouter/adapters/base.py,sha256=
|
|
28
|
-
coderouter/adapters/openai_compat.py,sha256
|
|
26
|
+
coderouter/adapters/anthropic_native.py,sha256=PXxgnERTm8bsCYrxpOaaJmPVq0FJVfocBjZ7HLNZA2c,30367
|
|
27
|
+
coderouter/adapters/base.py,sha256=83mFELqGq8i1E4uESTSjBgdPGSB1rj8FM9WRfNlIjPE,15484
|
|
28
|
+
coderouter/adapters/openai_compat.py,sha256=DKFIgZFpqzYyqsN49-MB1CA23CdV_1t19QHkvBhhlGI,24350
|
|
29
29
|
coderouter/adapters/registry.py,sha256=XNc1wmFv_oZlqKS0rA693TRDdbq1sZ-OIcofXOVOtq0,3680
|
|
30
|
+
coderouter/adapters/slot_affinity.py,sha256=iu4nqOFmwBoh7i3a1tR4jYgioq3Re2GH66Xr1XiDfvs,2067
|
|
30
31
|
coderouter/config/__init__.py,sha256=FODEn74fN-qZnt4INPSHswqhOlEgpL6-_onxsitSx8g,274
|
|
31
32
|
coderouter/config/capability_registry.py,sha256=RZgzHF54dXy0CCDocRCz2ee21qXGbbgTSKTkRI9iLL4,16936
|
|
32
33
|
coderouter/config/env_file.py,sha256=CoMK27fuAXm-NtoLzXb8yN2E-wDFjHQuFwiIlmgTBQw,10356
|
|
33
34
|
coderouter/config/loader.py,sha256=7FoJXWaO_vN9FAjUStJDwI4aAYcUQQgMJtq5BNy8Pnc,12419
|
|
34
|
-
coderouter/config/schemas.py,sha256=
|
|
35
|
+
coderouter/config/schemas.py,sha256=Xwkx8-6f6Ch0JMVnoUzBJLeD_ykIOOHt_p9KxRfx_EE,151645
|
|
35
36
|
coderouter/data/__init__.py,sha256=uNyfD9jaCvTWsBAWtaw1Fr25OSxzv3psGMfBjT1z0Cc,328
|
|
36
37
|
coderouter/data/model-capabilities.yaml,sha256=S9jt6SC6-3s2-icZ_n-a14iEMnc2yB1C2R6q-N_tZWQ,19309
|
|
37
38
|
coderouter/guards/__init__.py,sha256=5qliYBqygvVPneej7nx0uSjxDKsz7t8VzvrDgVBJlvU,1170
|
|
@@ -47,12 +48,13 @@ coderouter/guards/self_healing.py,sha256=XeUlgFWGqMQ5E9YvvzR2CsHRJOAJEyDChqRN0xm
|
|
|
47
48
|
coderouter/guards/tool_loop.py,sha256=EzeMcmU7BLeTW2jsRVevU81l5rhWcn1oUr7EpzgXjVM,15209
|
|
48
49
|
coderouter/ingress/__init__.py,sha256=WQsCH2CGJCAhy0mS6GSEdeYZRkkQu2OHDsP4CJWTLug,155
|
|
49
50
|
coderouter/ingress/anthropic_errors.py,sha256=q8F4LmH57f8Jh2hoV4Mmnvf9sZH32uiXhQXPRBZPjCE,8122
|
|
50
|
-
coderouter/ingress/anthropic_routes.py,sha256=
|
|
51
|
-
coderouter/ingress/app.py,sha256=
|
|
51
|
+
coderouter/ingress/anthropic_routes.py,sha256=2ADG_JgvmZteTm4rJfjdM5FU4IA9Wdtd9gZXm2-vI8Y,40561
|
|
52
|
+
coderouter/ingress/app.py,sha256=RVtth9FBmnqlB_siTpP-nrxBectMVKQoQSUhVCMk9uE,22639
|
|
52
53
|
coderouter/ingress/dashboard_routes.py,sha256=nPW5_pJe27-hzqCs4sqVVn0BrgXB_7Wcd4qZ6cirvWo,26736
|
|
53
54
|
coderouter/ingress/launcher_routes.py,sha256=uP_Otp9JE0fydUt1YP-wYcnS8Kj5RPLNIFf88YpfkPM,141535
|
|
54
55
|
coderouter/ingress/metrics_routes.py,sha256=4s_f9CY8nVIdQBfXxyUMlN7r5_cXHOaAu7PvNbUuoxg,4609
|
|
55
|
-
coderouter/ingress/openai_routes.py,sha256=
|
|
56
|
+
coderouter/ingress/openai_routes.py,sha256=Nc_Vh8rjLtc88oNbXfU9fwm-XZs0tTHVg-D5GEAuh_I,14484
|
|
57
|
+
coderouter/ingress/responses_routes.py,sha256=Fm2CvFlu2QpsvUQ1DjrWtvdFF_aHGcdN0au50sIrwTw,10490
|
|
56
58
|
coderouter/ingress/tool_search.py,sha256=JYnJ8SUqPmBfZmsl41TdBQNnux0mwbidKdsr5qn15Hk,3753
|
|
57
59
|
coderouter/ingress/ui_auth.py,sha256=uCWB5IaMQRNFYdY39FQ5DDVhsoRQJoqimZNSAu_QK_Q,3742
|
|
58
60
|
coderouter/metrics/__init__.py,sha256=7Es351DPS7yLM0yVF_F0eesmiD83n7Zzhie44chht38,1465
|
|
@@ -64,9 +66,9 @@ coderouter/plugins/loader.py,sha256=KLnKgO6_GE7OJulwo292cTYPvxqWZlLL8S0k_O3ZDcg,
|
|
|
64
66
|
coderouter/plugins/registry.py,sha256=8UDmRpHnRdB-ES_xpprvrvbDlhIhonOvFFXobR6MGJA,3739
|
|
65
67
|
coderouter/routing/__init__.py,sha256=oLQXPvKfrwy0OiGYNXngM9G_OxmJVLShv-nqyDaqSOs,441
|
|
66
68
|
coderouter/routing/adaptive.py,sha256=G2o377twGSjbUh65wiIFx6klnpFGjsD_nI3oDvcBwhY,21257
|
|
67
|
-
coderouter/routing/auto_router.py,sha256=
|
|
69
|
+
coderouter/routing/auto_router.py,sha256=XkRTf0oT4zdTTeJagZdvnyW6hOdgtZ_arwb8NN1h01Y,14980
|
|
68
70
|
coderouter/routing/budget.py,sha256=PblmVKJGs_BwNa9uDHAA8hmZ4XIVKv38mHAeU0V3OMs,8451
|
|
69
|
-
coderouter/routing/capability.py,sha256=
|
|
71
|
+
coderouter/routing/capability.py,sha256=_RM9I6qG_oQLN_ZN4n7Xd7__g-CtClX9cdhtKvuJUvA,28018
|
|
70
72
|
coderouter/routing/fallback.py,sha256=vx1Vrl_vy7-dLxkKvipfba_pbhQPbuhRVFjmuMMWyaI,176825
|
|
71
73
|
coderouter/routing/fallback_trace.py,sha256=LwUw56mhVIkP4Gu-fNvZmOjL8hXxY1ci6b1MuGjl5m0,20099
|
|
72
74
|
coderouter/state/__init__.py,sha256=XoGcPmmBQSiZWML2S0juSveQ78xfhtdeCliNnVyzu7E,1088
|
|
@@ -76,12 +78,13 @@ coderouter/state/request_log.py,sha256=JlEvkWHwGtoLesnqr0XJy9CyXQDX4ZRHFMTPJ_0Fe
|
|
|
76
78
|
coderouter/state/store.py,sha256=h-rsMJq8GILsOfCP94nI40cuHaj4Vqycsm9UNN77REI,7445
|
|
77
79
|
coderouter/state/suggest_rules.py,sha256=FvdhEvao5NvdKp9zs8AkcoFKHY4yqqXY2HekvSjpDFA,16670
|
|
78
80
|
coderouter/translation/__init__.py,sha256=PYXN7XVEwpG1uC8RLy6fvnGbzEZhhrEuUapH8IYOtG8,1788
|
|
79
|
-
coderouter/translation/anthropic.py,sha256=
|
|
80
|
-
coderouter/translation/convert.py,sha256=
|
|
81
|
+
coderouter/translation/anthropic.py,sha256=49OMMIKBRZqsWhl0VhlMck8R-W34vxaTgpIlKI0kvVg,13655
|
|
82
|
+
coderouter/translation/convert.py,sha256=9lkfk8ByfbgiVh2WP6Hwh8UorOtrTxZBknvu_dsHnnI,53261
|
|
83
|
+
coderouter/translation/responses.py,sha256=dFdwu6DC95TO9PhTiid-XJ5S6bFReDI_O6lHYjT___g,26944
|
|
81
84
|
coderouter/translation/tool_repair.py,sha256=1p8rmdyyscGX2g0DDOYitMnLv-nKfR1SLuLaRB4z7GM,64244
|
|
82
85
|
coderouter/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
83
|
-
coderouter_cli-2.
|
|
84
|
-
coderouter_cli-2.
|
|
85
|
-
coderouter_cli-2.
|
|
86
|
-
coderouter_cli-2.
|
|
87
|
-
coderouter_cli-2.
|
|
86
|
+
coderouter_cli-2.19.0.dist-info/METADATA,sha256=zrqcHuOfiuqrSrI82GMaAeWm1aRJtxvHBVXnpbTwhWA,17965
|
|
87
|
+
coderouter_cli-2.19.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
88
|
+
coderouter_cli-2.19.0.dist-info/entry_points.txt,sha256=-dnLfD1YZ2WjH2zSdNCvlO65wYltM9bsHt9Fhg3yGss,51
|
|
89
|
+
coderouter_cli-2.19.0.dist-info/licenses/LICENSE,sha256=wkEzoR86jFw33jvfOHjULqmkGEfxTFMgMaJnpR8mPRw,1065
|
|
90
|
+
coderouter_cli-2.19.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|