File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,24 @@ If you already have Claude Code's `ANTHROPIC_*` or OCR's own `OCR_LLM_*`
125125environment variables configured, OCR picks them up automatically — no
126126config file needed.
127127
128+ ### Using CC-Switch
129+
130+ If you use [ CC-Switch] ( https://github.com/farion1231/cc-switch ) with its
131+ [ routing service] ( https://www.ccswitch.io/en/docs?section=proxy&item=service )
132+ enabled, point the provider ` url ` at the local proxy — no other setup is
133+ required:
134+
135+ ``` bash
136+ # Claude (Anthropic-compatible)
137+ ocr config set providers.anthropic.url http://127.0.0.1:15721
138+
139+ # Codex / OpenAI-compatible — set that provider's url key instead
140+ ocr config set providers.< name> .url http://127.0.0.1:15721/v1
141+ ```
142+
143+ ` api_key ` can be any value. ` extra_body ` (and other per-provider fields)
144+ still apply as usual.
145+
128146### Send vendor-specific fields
129147
130148Some providers require non-standard request fields (such as Bedrock-style
Original file line number Diff line number Diff line change @@ -123,6 +123,24 @@ Claude Code の `ANTHROPIC_*` や OCR 独自の `OCR_LLM_*` 環境変数をす
123123設定している場合、OCR はそれらを自動的に認識するため、設定ファイルを書く
124124必要はありません。
125125
126+ ### CC-Switch を使う
127+
128+ [ CC-Switch] ( https://github.com/farion1231/cc-switch ) を
129+ [ ルーティングサービス] ( https://www.ccswitch.io/en/docs?section=proxy&item=service )
130+ 有効で使用している場合、プロバイダーの ` url ` をローカルプロキシに向けるだけで、
131+ 追加設定なしで利用できます:
132+
133+ ``` bash
134+ # Claude(Anthropic 互換)
135+ ocr config set providers.anthropic.url http://127.0.0.1:15721
136+
137+ # Codex / OpenAI 互換 — そのプロバイダーの url キーを設定
138+ ocr config set providers.< name> .url http://127.0.0.1:15721/v1
139+ ```
140+
141+ ` api_key ` は任意の値で構いません。` extra_body ` (およびその他のプロバイダー固有フィールド)は
142+ 引き続き有効です。
143+
126144### ベンダー固有のフィールドを送信する
127145
128146一部の provider は非標準のリクエストフィールド(Bedrock 風の ` thinking ` など)を
Original file line number Diff line number Diff line change @@ -115,6 +115,22 @@ ocr llm test
115115
116116如果你已经配好了 Claude Code 的 ` ANTHROPIC_* ` ,或 OCR 自己的 ` OCR_LLM_* ` 环境变量,OCR 会自动识别,无需再写配置文件。
117117
118+ ### 使用 CC-Switch
119+
120+ 如果你使用 [ CC-Switch] ( https://github.com/farion1231/cc-switch ) 并开启了
121+ [ 路由服务] ( https://www.ccswitch.io/zh/docs?section=proxy&item=service ) ,
122+ 可以将供应商的 ` url ` 配置成 CC-Switch 启动的代理地址,无需额外配置:
123+
124+ ``` bash
125+ # Claude(Anthropic 兼容)
126+ ocr config set providers.anthropic.url http://127.0.0.1:15721
127+
128+ # Codex / OpenAI 兼容 — 将该供应商的 url 键设为代理地址
129+ ocr config set providers.< name> .url http://127.0.0.1:15721/v1
130+ ```
131+
132+ ` api_key ` 可设置为任意值。` extra_body ` (及其他按供应商字段)依然生效。
133+
118134### 发送厂商专属字段
119135
120136某些 provider 需要非标准的请求字段(如 Bedrock 风格的 ` thinking ` )。用` extra_body ` (合并进每次请求)即可发送,无需改源码:
You can’t perform that action at this time.
0 commit comments