claude-openrouter 0.1.0__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 (34) hide show
  1. claude_openrouter-0.1.0/.github/workflows/ci.yml +38 -0
  2. claude_openrouter-0.1.0/.github/workflows/publish.yml +43 -0
  3. claude_openrouter-0.1.0/.gitignore +6 -0
  4. claude_openrouter-0.1.0/LICENSE +22 -0
  5. claude_openrouter-0.1.0/PKG-INFO +202 -0
  6. claude_openrouter-0.1.0/README.md +176 -0
  7. claude_openrouter-0.1.0/docs/assets/demo.cast +21 -0
  8. claude_openrouter-0.1.0/docs/assets/demo.gif +0 -0
  9. claude_openrouter-0.1.0/docs/assets/demo.mp4 +0 -0
  10. claude_openrouter-0.1.0/install.sh +186 -0
  11. claude_openrouter-0.1.0/pyproject.toml +52 -0
  12. claude_openrouter-0.1.0/scripts/build-release.sh +15 -0
  13. claude_openrouter-0.1.0/scripts/capture-demo.exp +45 -0
  14. claude_openrouter-0.1.0/scripts/capture-demo.sh +52 -0
  15. claude_openrouter-0.1.0/scripts/prepare-demo.py +46 -0
  16. claude_openrouter-0.1.0/scripts/render-demo.sh +36 -0
  17. claude_openrouter-0.1.0/scripts/sanitize-demo-cast.py +30 -0
  18. claude_openrouter-0.1.0/src/claude_openrouter/__init__.py +4 -0
  19. claude_openrouter-0.1.0/src/claude_openrouter/__main__.py +4 -0
  20. claude_openrouter-0.1.0/src/claude_openrouter/cli.py +262 -0
  21. claude_openrouter-0.1.0/src/claude_openrouter/models.py +160 -0
  22. claude_openrouter-0.1.0/src/claude_openrouter/openrouter.py +136 -0
  23. claude_openrouter-0.1.0/src/claude_openrouter/paths.py +53 -0
  24. claude_openrouter-0.1.0/src/claude_openrouter/picker.py +152 -0
  25. claude_openrouter-0.1.0/src/claude_openrouter/settings.py +223 -0
  26. claude_openrouter-0.1.0/src/claude_openrouter/storage.py +58 -0
  27. claude_openrouter-0.1.0/src/claude_openrouter/uninstall.py +71 -0
  28. claude_openrouter-0.1.0/tests/conftest.py +61 -0
  29. claude_openrouter-0.1.0/tests/test_cli.py +69 -0
  30. claude_openrouter-0.1.0/tests/test_install.py +27 -0
  31. claude_openrouter-0.1.0/tests/test_models.py +60 -0
  32. claude_openrouter-0.1.0/tests/test_openrouter.py +70 -0
  33. claude_openrouter-0.1.0/tests/test_settings.py +104 -0
  34. claude_openrouter-0.1.0/uv.lock +8 -0
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ name: Python ${{ matrix.python-version }}
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.10", "3.12", "3.13"]
19
+ steps:
20
+ - uses: actions/checkout@v5
21
+ - uses: astral-sh/setup-uv@v7
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ enable-cache: true
25
+ - run: uv run --with pytest pytest -q
26
+ - if: matrix.python-version == '3.12'
27
+ run: uv run --with ruff ruff check .
28
+
29
+ package:
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v5
33
+ - uses: astral-sh/setup-uv@v7
34
+ with:
35
+ enable-cache: true
36
+ - run: uv build
37
+ - run: uv run --with twine twine check dist/*.whl dist/*.tar.gz
38
+
@@ -0,0 +1,43 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v5
16
+ - uses: astral-sh/setup-uv@v7
17
+ with:
18
+ python-version: "3.12"
19
+ enable-cache: true
20
+ - run: uv run --with pytest pytest -q
21
+ - run: uv run --with ruff ruff check .
22
+ - run: uv build
23
+ - run: uv run --with twine twine check dist/*.whl dist/*.tar.gz
24
+ - uses: actions/upload-artifact@v4
25
+ with:
26
+ name: python-package
27
+ path: |
28
+ dist/*.whl
29
+ dist/*.tar.gz
30
+ if-no-files-found: error
31
+
32
+ publish:
33
+ needs: build
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/download-artifact@v5
37
+ with:
38
+ name: python-package
39
+ path: dist
40
+ - uses: pypa/gh-action-pypi-publish@release/v1
41
+ with:
42
+ password: ${{ secrets.PYPI_API_TOKEN }}
43
+
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ .pytest_cache/
3
+ .ruff_cache/
4
+ __pycache__/
5
+ *.py[cod]
6
+
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 xhluca
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.5
2
+ Name: claude-openrouter
3
+ Version: 0.1.0
4
+ Summary: Select OpenRouter models directly inside Claude Code
5
+ Project-URL: Homepage, https://xhluca.github.io/claude-openrouter/
6
+ Project-URL: Repository, https://github.com/xhluca/claude-openrouter
7
+ Project-URL: Issues, https://github.com/xhluca/claude-openrouter/issues
8
+ Project-URL: Installer, https://xhluca.github.io/claude-openrouter/install.sh
9
+ Author: xhluca
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: claude-code,cli,coding-agent,openrouter
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Software Development :: User Interfaces
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+
27
+ <h1 align="center">Claude OpenRouter</h1>
28
+
29
+ <p align="center"><strong>Put your OpenRouter favorites directly in Claude Code's <code>/model</code> picker.</strong></p>
30
+
31
+ <p align="center">
32
+ <a href="https://pypi.org/project/claude-openrouter/"><img src="https://img.shields.io/pypi/v/claude-openrouter?style=flat-square&color=d97757&label=PyPI" alt="PyPI version"></a>
33
+ <a href="https://pypi.org/project/claude-openrouter/"><img src="https://img.shields.io/pypi/pyversions/claude-openrouter?style=flat-square" alt="Python versions"></a>
34
+ <a href="https://github.com/xhluca/claude-openrouter/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-8dbdff?style=flat-square" alt="MIT license"></a>
35
+ </p>
36
+
37
+ <p align="center">
38
+ <img src="https://raw.githubusercontent.com/xhluca/claude-openrouter/main/docs/assets/demo.gif" alt="Installing Claude OpenRouter, searching OpenRouter models, and adding favorites to Claude Code" width="860">
39
+ </p>
40
+
41
+ Claude OpenRouter is a small, dependency-free CLI. It indexes OpenRouter's live
42
+ model catalog, gives you a searchable multi-select picker, and writes your
43
+ favorites into Claude Code's native `/model` menu. There is no local proxy,
44
+ background service, or replacement harness.
45
+
46
+ ## Install
47
+
48
+ ```bash
49
+ curl -LsSf https://xhluca.github.io/claude-openrouter/install.sh | sh
50
+ ```
51
+
52
+ The installer prompts for your OpenRouter key without echoing it, fetches the
53
+ current catalog, and opens the model picker immediately. It installs for the
54
+ current user on Linux or macOS.
55
+
56
+ Or use `uv`:
57
+
58
+ ```bash
59
+ uv tool install claude-openrouter
60
+ clor setup
61
+ ```
62
+
63
+ For a one-off setup without installing the package first:
64
+
65
+ ```bash
66
+ uvx claude-openrouter setup
67
+ ```
68
+
69
+ `pipx install claude-openrouter` works too. The full command is
70
+ `claude-openrouter`; `clor` is the shorthand. Claude Code 2.1.242 or newer is
71
+ required for the multi-model picker.
72
+
73
+ ## Quick start
74
+
75
+ Refresh the local catalog:
76
+
77
+ ```bash
78
+ clor index
79
+ ```
80
+
81
+ `fetch` is an alias for `index`. `index` is the canonical name because the
82
+ result is a persistent local catalog used by selection and search.
83
+
84
+ Search refreshes the index first. Plain terms are case-insensitive substring
85
+ globs; `*`, `?`, and bracket expressions use shell-style matching:
86
+
87
+ ```bash
88
+ clor search claude
89
+ clor search 'anthropic/*' '*coder*'
90
+ clor search --regex '^(anthropic|google)/.*(sonnet|gemini)'
91
+ ```
92
+
93
+ Select one exact model, several exact models, or open the interactive picker:
94
+
95
+ ```bash
96
+ clor select anthropic/claude-sonnet-4.6
97
+ clor select --model openai/gpt-5.4
98
+ clor select --models anthropic/claude-opus-4.6 google/gemini-3.1-pro-preview
99
+ clor select
100
+ ```
101
+
102
+ The positional value is shorthand for `--model`. Each non-interactive call
103
+ replaces the saved favorite set. In the picker, type a search and press Enter,
104
+ use the arrow keys, press Enter or Space to select and deselect, `/` to search
105
+ again, and `s` to save.
106
+
107
+ Restart Claude Code, then switch normally:
108
+
109
+ ```text
110
+ > /model
111
+ ```
112
+
113
+ The selected rows are Claude Code's native picker rows, and requests use the
114
+ OpenRouter key stored by this tool.
115
+
116
+ ## Commands
117
+
118
+ | Command | Purpose |
119
+ | --- | --- |
120
+ | `clor index` | Fetch and cache the current OpenRouter model catalog |
121
+ | `clor fetch` | Alias for `index` |
122
+ | `clor search QUERY...` | Refresh, then search names, IDs, and descriptions |
123
+ | `clor setup` | Run the install-time key and model setup again |
124
+ | `clor select [MODEL]` | Replace `/model` favorites exactly |
125
+ | `clor config` | Replace and validate the stored OpenRouter key |
126
+ | `clor reset` | Restore the original Claude settings and delete tool data |
127
+ | `clor uninstall` | Reset the integration and remove a curl/uv installation |
128
+
129
+ Every catalog command also accepts `--json` where useful. API keys are never
130
+ accepted as command-line arguments; automation can pipe one to `setup
131
+ --key-stdin` or `config --key-stdin`.
132
+
133
+ ## What it changes
134
+
135
+ ```text
136
+ OpenRouter API → local model index → selected favorites → Claude Code /model
137
+ ```
138
+
139
+ - Stores the key at `~/.config/claude-openrouter/credential` with mode `0600`.
140
+ - Adds a tiny `apiKeyHelper` to Claude Code, so the key is not copied into
141
+ `~/.claude/settings.json`.
142
+ - Sets Claude Code's API base URL to OpenRouter's native Anthropic-compatible
143
+ endpoint and clears higher-precedence Anthropic key/token variables inside
144
+ Claude Code so the helper is selected.
145
+ - Writes selected models through Claude Code's user-level `modelPicker` setting.
146
+ - Backs up only the settings fields it owns and preserves unrelated settings.
147
+
148
+ Claude Code is optimized for Anthropic models. OpenRouter can accept other model
149
+ IDs through its Anthropic-compatible endpoint, but models differ in tool use,
150
+ thinking blocks, context handling, and Claude Code compatibility. Prefer models
151
+ that OpenRouter documents as suitable for agentic tool use.
152
+
153
+ ## Reset and uninstall
154
+
155
+ Restore the pre-install Claude settings while keeping the command:
156
+
157
+ ```bash
158
+ clor reset
159
+ ```
160
+
161
+ Restore settings, remove the credential and index, and uninstall a curl/uv tool
162
+ installation:
163
+
164
+ ```bash
165
+ clor uninstall
166
+ ```
167
+
168
+ ## Demo
169
+
170
+ The animation above is rendered from a real asciinema capture of the installed
171
+ CLI and the native Claude Code TUI: hidden key entry, live catalog indexing,
172
+ glob search, interactive multi-selection, and the resulting `/model` rows. It
173
+ uses a deliberately fake credential only to read OpenRouter's public catalog;
174
+ it makes no inference request. The prompt is not echoed, and the scripts reject
175
+ any cast containing a key-shaped string before publishing it. The only
176
+ post-processing replaces the randomized temporary home path with `~`.
177
+
178
+ [Watch the MP4](https://github.com/xhluca/claude-openrouter/raw/main/docs/assets/demo.mp4)
179
+ or [reproduce the capture](scripts/render-demo.sh).
180
+
181
+ ## Development
182
+
183
+ ```bash
184
+ git clone https://github.com/xhluca/claude-openrouter.git
185
+ cd claude-openrouter
186
+ uv run --with pytest pytest
187
+ uv run --with ruff ruff check .
188
+ ```
189
+
190
+ ## License
191
+
192
+ [MIT](LICENSE)
193
+
194
+ ## Acknowledgements
195
+
196
+ [Claude Code Router (CCR)](https://github.com/musistudio/claude-code-router)
197
+ helped establish the broader Claude Code routing space. CCR is a full,
198
+ self-contained routing and UI-based management system spanning providers,
199
+ profiles, routing rules, and more. Claude OpenRouter is intentionally narrower:
200
+ it is a simple connection from Claude Code to OpenRouter, installs with one
201
+ small Bash command (or `uv`/`uvx`), and does not aim to cover CCR's full
202
+ management spectrum.
@@ -0,0 +1,176 @@
1
+ <h1 align="center">Claude OpenRouter</h1>
2
+
3
+ <p align="center"><strong>Put your OpenRouter favorites directly in Claude Code's <code>/model</code> picker.</strong></p>
4
+
5
+ <p align="center">
6
+ <a href="https://pypi.org/project/claude-openrouter/"><img src="https://img.shields.io/pypi/v/claude-openrouter?style=flat-square&color=d97757&label=PyPI" alt="PyPI version"></a>
7
+ <a href="https://pypi.org/project/claude-openrouter/"><img src="https://img.shields.io/pypi/pyversions/claude-openrouter?style=flat-square" alt="Python versions"></a>
8
+ <a href="https://github.com/xhluca/claude-openrouter/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-8dbdff?style=flat-square" alt="MIT license"></a>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <img src="https://raw.githubusercontent.com/xhluca/claude-openrouter/main/docs/assets/demo.gif" alt="Installing Claude OpenRouter, searching OpenRouter models, and adding favorites to Claude Code" width="860">
13
+ </p>
14
+
15
+ Claude OpenRouter is a small, dependency-free CLI. It indexes OpenRouter's live
16
+ model catalog, gives you a searchable multi-select picker, and writes your
17
+ favorites into Claude Code's native `/model` menu. There is no local proxy,
18
+ background service, or replacement harness.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ curl -LsSf https://xhluca.github.io/claude-openrouter/install.sh | sh
24
+ ```
25
+
26
+ The installer prompts for your OpenRouter key without echoing it, fetches the
27
+ current catalog, and opens the model picker immediately. It installs for the
28
+ current user on Linux or macOS.
29
+
30
+ Or use `uv`:
31
+
32
+ ```bash
33
+ uv tool install claude-openrouter
34
+ clor setup
35
+ ```
36
+
37
+ For a one-off setup without installing the package first:
38
+
39
+ ```bash
40
+ uvx claude-openrouter setup
41
+ ```
42
+
43
+ `pipx install claude-openrouter` works too. The full command is
44
+ `claude-openrouter`; `clor` is the shorthand. Claude Code 2.1.242 or newer is
45
+ required for the multi-model picker.
46
+
47
+ ## Quick start
48
+
49
+ Refresh the local catalog:
50
+
51
+ ```bash
52
+ clor index
53
+ ```
54
+
55
+ `fetch` is an alias for `index`. `index` is the canonical name because the
56
+ result is a persistent local catalog used by selection and search.
57
+
58
+ Search refreshes the index first. Plain terms are case-insensitive substring
59
+ globs; `*`, `?`, and bracket expressions use shell-style matching:
60
+
61
+ ```bash
62
+ clor search claude
63
+ clor search 'anthropic/*' '*coder*'
64
+ clor search --regex '^(anthropic|google)/.*(sonnet|gemini)'
65
+ ```
66
+
67
+ Select one exact model, several exact models, or open the interactive picker:
68
+
69
+ ```bash
70
+ clor select anthropic/claude-sonnet-4.6
71
+ clor select --model openai/gpt-5.4
72
+ clor select --models anthropic/claude-opus-4.6 google/gemini-3.1-pro-preview
73
+ clor select
74
+ ```
75
+
76
+ The positional value is shorthand for `--model`. Each non-interactive call
77
+ replaces the saved favorite set. In the picker, type a search and press Enter,
78
+ use the arrow keys, press Enter or Space to select and deselect, `/` to search
79
+ again, and `s` to save.
80
+
81
+ Restart Claude Code, then switch normally:
82
+
83
+ ```text
84
+ > /model
85
+ ```
86
+
87
+ The selected rows are Claude Code's native picker rows, and requests use the
88
+ OpenRouter key stored by this tool.
89
+
90
+ ## Commands
91
+
92
+ | Command | Purpose |
93
+ | --- | --- |
94
+ | `clor index` | Fetch and cache the current OpenRouter model catalog |
95
+ | `clor fetch` | Alias for `index` |
96
+ | `clor search QUERY...` | Refresh, then search names, IDs, and descriptions |
97
+ | `clor setup` | Run the install-time key and model setup again |
98
+ | `clor select [MODEL]` | Replace `/model` favorites exactly |
99
+ | `clor config` | Replace and validate the stored OpenRouter key |
100
+ | `clor reset` | Restore the original Claude settings and delete tool data |
101
+ | `clor uninstall` | Reset the integration and remove a curl/uv installation |
102
+
103
+ Every catalog command also accepts `--json` where useful. API keys are never
104
+ accepted as command-line arguments; automation can pipe one to `setup
105
+ --key-stdin` or `config --key-stdin`.
106
+
107
+ ## What it changes
108
+
109
+ ```text
110
+ OpenRouter API → local model index → selected favorites → Claude Code /model
111
+ ```
112
+
113
+ - Stores the key at `~/.config/claude-openrouter/credential` with mode `0600`.
114
+ - Adds a tiny `apiKeyHelper` to Claude Code, so the key is not copied into
115
+ `~/.claude/settings.json`.
116
+ - Sets Claude Code's API base URL to OpenRouter's native Anthropic-compatible
117
+ endpoint and clears higher-precedence Anthropic key/token variables inside
118
+ Claude Code so the helper is selected.
119
+ - Writes selected models through Claude Code's user-level `modelPicker` setting.
120
+ - Backs up only the settings fields it owns and preserves unrelated settings.
121
+
122
+ Claude Code is optimized for Anthropic models. OpenRouter can accept other model
123
+ IDs through its Anthropic-compatible endpoint, but models differ in tool use,
124
+ thinking blocks, context handling, and Claude Code compatibility. Prefer models
125
+ that OpenRouter documents as suitable for agentic tool use.
126
+
127
+ ## Reset and uninstall
128
+
129
+ Restore the pre-install Claude settings while keeping the command:
130
+
131
+ ```bash
132
+ clor reset
133
+ ```
134
+
135
+ Restore settings, remove the credential and index, and uninstall a curl/uv tool
136
+ installation:
137
+
138
+ ```bash
139
+ clor uninstall
140
+ ```
141
+
142
+ ## Demo
143
+
144
+ The animation above is rendered from a real asciinema capture of the installed
145
+ CLI and the native Claude Code TUI: hidden key entry, live catalog indexing,
146
+ glob search, interactive multi-selection, and the resulting `/model` rows. It
147
+ uses a deliberately fake credential only to read OpenRouter's public catalog;
148
+ it makes no inference request. The prompt is not echoed, and the scripts reject
149
+ any cast containing a key-shaped string before publishing it. The only
150
+ post-processing replaces the randomized temporary home path with `~`.
151
+
152
+ [Watch the MP4](https://github.com/xhluca/claude-openrouter/raw/main/docs/assets/demo.mp4)
153
+ or [reproduce the capture](scripts/render-demo.sh).
154
+
155
+ ## Development
156
+
157
+ ```bash
158
+ git clone https://github.com/xhluca/claude-openrouter.git
159
+ cd claude-openrouter
160
+ uv run --with pytest pytest
161
+ uv run --with ruff ruff check .
162
+ ```
163
+
164
+ ## License
165
+
166
+ [MIT](LICENSE)
167
+
168
+ ## Acknowledgements
169
+
170
+ [Claude Code Router (CCR)](https://github.com/musistudio/claude-code-router)
171
+ helped establish the broader Claude Code routing space. CCR is a full,
172
+ self-contained routing and UI-based management system spanning providers,
173
+ profiles, routing rules, and more. Claude OpenRouter is intentionally narrower:
174
+ it is a simple connection from Claude Code to OpenRouter, installs with one
175
+ small Bash command (or `uv`/`uvx`), and does not aim to cover CCR's full
176
+ management spectrum.
@@ -0,0 +1,21 @@
1
+ {"version":2,"width":100,"height":34,"timestamp":1787770413,"idle_time_limit":3.0,"env":{"SHELL":"/bin/bash","TERM":"xterm-256color"},"title":"Claude OpenRouter — real CLI and Claude Code /model picker"}
2
+ [0.012125,"o","\u001b[?2004hdemo ❯ "]
3
+ [0.012778,"o","clor setup --no-validate\r\r\n\u001b[?2004l\r"]
4
+ [0.059956,"o","OpenRouter API key: "]
5
+ [4.565675,"o","\r\r\n\u001b[?1049h\u001b[22;0;0t\u001b[1;34r\u001b(B\u001b[m\u001b[4l\u001b[?7h\u001b[?1h\u001b=\u001b[39;49m\u001b[?1h\u001b=\u001b[?12l\u001b[?25h\u001b[39;49m\u001b(B\u001b[m\u001b[H\u001b[2J\u001b(B\u001b[0;1mClaude OpenRouter — choose /model favorites\r\u001b[3d\u001b(B\u001b[mSearch:\r\u001b[4dType a term, then press Enter to browse matches.\r\u001b[5d\u001b(B\u001b[0;1mSelected: 0\r\u001b[6d\u001b(B\u001b[m○ z-ai/glm-5.3-flash — Z.ai: GLM 5.3 Flash\r\u001b[7d○ meta/muse-spark-1.2-contributor — Meta: Muse Spark 1.2 Contributor\r\u001b[8d○ deepseek/deepseek-v4-flash-vision-exp — DeepSeek: DeepSeek V4 Flash Vision Exp\r\u001b[9d○ tencent/hy-mt2-1.8b — Tencent: Hy-MT2-1.8B\r\u001b[10d○ tencent/hy-mt2-30b-a3b — Tencent: Hy-MT2-30B-A3B\r\u001b[11d○ ~z-ai/glm-latest — Z.ai: GLM Latest\r\u001b[12d○ tencent/hy-mt2-7b — Tencent: Hy-MT2-7B\r\u001b[13d○ z-ai/glm-5.3 — Z.ai: GLM 5.3\r\u001b[14d○ qwen/qwen3.8-27b — Qwen: Qwen3.8 27B\r\u001b[15d○ dots-studio/dots-3-note-preview:free — Dots Studio: Dots3-Note Preview (free)\r\u001b[16d○ google/gemini-3.7-flash — Google: Gemini 3.7 Flash\r\u001b[17d○ google/gemini-3.7-flash:batch — Google: Gemini 3.7 Flash (batch)\r\u001b[18d○ bytedance-seed/seed-2-1-turbo — ByteDance Seed: Seed 2.1 Turbo\r\u001b[19d○ qwen/qwen3.8-2.4t-a95b — Qwen: Qwen3.8 2.4T A95B\r\u001b[20d○ bytedance-seed/seed-2.0-code — ByteDance Seed: Seed-2.0-Code\u001b[3;9Hc\u001b[6;3Hcohere/command-a — Cohere: Command A\u001b[K\u001b[7;3Hcohere/command-r-08-2024 — Cohere: Command R (08-2024)\u001b[K\u001b[8;3Hcohere/command-r7b-12-2024 — Cohere: Command R7B (12-2024)\u001b[K\u001b[9;3Hcohere/north-mini-code:free — Cohere: North Mini Code (free)\u001b[10;3Hcohere/command-r-plus-08-2024 — Cohere: Command R+ (08-2024)\u001b[11;3Hcognitivecomputations/dolphin-mistral-24b-venice-edition — Venice: Uncensored\u001b[12;3Hmicrosoft/phi-4 — Microsoft: Phi 4\u001b[K\u001b[13;3Hinception/mercury-2 — Inception: Mercury 2\u001b[14;3Harcee-ai/virtuoso-large — Arcee AI: Virtuoso Large\u001b[15;3Hinclusionai/ling-3.0-flash — Ling-3.0-flash\u001b[K\u001b[16;3Hmicrosoft/wizardlm-2-8x22b — WizardLM-2 8x22B\u001b[K\u001b[17;3Harcee-ai/trinity-large-thinking — Arcee AI: Trinity Large Thinking\u001b[18;3Htencent/hy3 — Tencent: Hy3\u001b[K\u001b[19;3Hmancer/weaver — Mancer: Weaver (alpha)\u001b[K\u001b[20;3Htencent/hy-mt2-7b — Tencent: Hy-MT2-7B\u001b[K\u001b[3;10Hl\u001b[6;3Hinclusionai/ling-3.0-flash — Ling-3.0-flash\u001b[7;3Hanthropic/claude-opus-4 — Anthropic: Claude Opus 4\u001b[K\u001b[8;3Hanthropic/claude-opus-5 — Claude Opus 5\u001b[K\u001b[9;3Hanthropic/claude-3-haiku — Anthropic: Claude 3 Haiku\u001b[K\u001b[10;3Hanthropic/claude-fable-5 — Anthropic: Claude Fable 5\u001b[K\u001b[11;3Hanthropic/claude-opus-4.1 — Anthropic: Claude Opus 4.1\u001b[K\u001b[12;3Hanthropic/claude-opus-4.5 — Anthropic: Claude Opus 4.5\u001b[13;3Hanthropic/claude-opus-4.6 — Anthropic: Claude Opus 4.6\u001b[14;4Hnthropic/claude-opus-4.7 — Anthropic: Claude Opus 4.7\u001b[15;3Hanthropic/claude-opus-4.8 — Anthropic: Claude Opus 4.8\u001b[16;3Hanthropic/claude-sonnet-4 — Anthropic: Claude Sonnet 4\u001b[17;4Hnthropic/claude-sonnet-5 — Anthropic: Claude Sonnet 5\u001b[K\u001b[18;3Hanthropic/claude-haiku-4.5 — Anthropic: Claude Haiku 4.5\u001b[19;3Hanthropic/claude-sonnet-4.5 — Anthropic: Claude Sonnet 4.5\u001b[20;3Hanthropic/claude-sonnet-4.6 — Anthropic: Claude Sonnet 4.6\u001b[3;11H\r\u001b[6d\u001b[M\u001b[3;11Ha\r\u001b[20d○ anthropic/claude-opus-5-fast — Claude Opus 5 (Fast)\u001b[3;12Hude-\r\u001b[8d\u001b[10M\u001b[3;16Hs\u001b[6;20Hsonnet-4 — Anthropic: Claude Sonnet 4\u001b[7;20Hsonnet-5 — Anthropic: Claude Sonnet 5\u001b[10;20Hsonnet-5:batch — Anthropic: Claude Sonnet 5 (batch)\r\u001b[11d○ anthropic/claude-sonnet-4.5:batch — Anthropic: Claude Sonnet 4.5 (batch)\r\u001b[12d○ anthropic/claude-sonnet-4.6:batch — Anthropic: Claude Sonnet 4.6 (batch)\r\u001b[13d○ ~anthropic/claude-sonnet-latest — Anthropic Claude Sonnet Latest\r\u001b[14d○ mancer/weaver — Mancer: Weaver (alpha)\u001b[3;17H\r\u001b[14d\u001b[J\u001b[3;17Honnet-\r\u001b[9d\u001b[2M\u001b[11d\u001b[J\u001b[3;23H4\u001b[7;27H4.5 — Anthropic: Claude Sonnet 4.5\u001b[8;29H6\u001b[8;60H6\u001b[3;24H\r\u001b[6d\u001b[M\u001b[3;24H.\r\u001b[7d\u001b[2M\u001b[3;25H6\u001b[6;29H6\u001b[6;60H6\u001b[3;26H\u001b[?25l\r\u001b[4d↑/↓ move · Enter/Space select · / search · s save · q cancel\r\u001b[6d\u001b(B\u001b[0;7m○ anthropic/claude-sonnet-4.6 — Anthropic: Claude Sonnet 4.6\u001b[7;75H\u001b(B\u001b[m\u001b[5;11H\u001b(B\u001b[0;1m1\r\u001b[6d\u001b(B\u001b[0;7m●\u001b[7;75H\u001b(B\u001b[m\u001b[?12l\u001b[?25h\u001b[3;9H\u001b[K\r\u001b[4dType a term, then press Enter to browse matches.\u001b[K\r\u001b[6d○ z-ai/glm-5.3-flash "]
6
+ [4.565889,"o","— Z.ai: GLM 5.3 Flash\u001b[K\u001b[7;3Hmeta/muse-spark-1.2-contributor — Meta: Muse Spark 1.2 Contributor\u001b[K\r\u001b[8d○ deepseek/deepseek-v4-flash-vision-exp — DeepSeek: DeepSeek V4 Flash Vision Exp\r\u001b[9d○ tencent/hy-mt2-1.8b — Tencent: Hy-MT2-1.8B\r\u001b[10d○ tencent/hy-mt2-30b-a3b — Tencent: Hy-MT2-30B-A3B\r\u001b[11d○ ~z-ai/glm-latest — Z.ai: GLM Latest\r\u001b[12d○ tencent/hy-mt2-7b — Tencent: Hy-MT2-7B\r\u001b[13d○ z-ai/glm-5.3 — Z.ai: GLM 5.3\r\u001b[14d○ qwen/qwen3.8-27b — Qwen: Qwen3.8 27B\r\u001b[15d○ dots-studio/dots-3-note-preview:free — Dots Studio: Dots3-Note Preview (free)\r\u001b[16d○ google/gemini-3.7-flash — Google: Gemini 3.7 Flash\r\u001b[17d○ google/gemini-3.7-flash:batch — Google: Gemini 3.7 Flash (batch)\r\u001b[18d○ bytedance-seed/seed-2-1-turbo — ByteDance Seed: Seed 2.1 Turbo\r\u001b[19d○ qwen/qwen3.8-2.4t-a95b — Qwen: Qwen3.8 2.4T A95B\r\u001b[20d○ bytedance-seed/seed-2.0-code — ByteDance Seed: Seed-2.0-Code\u001b[3;9Hg\u001b[6;3Hgoogle/gemma-3-4b-it — Google: Gemma 3 4B\u001b[7;3Hgoogle/gemini-2.5-pro — Google: Gemini 2.5 Pro\u001b[K\u001b[8;3Hgoogle/gemma-2-27b-it — Google: Gemma 2 27B\u001b[K\u001b[9;3Hgoogle/gemma-3-12b-it — Google: Gemma 3 12B\u001b[10;3Hgoogle/gemma-3-27b-it — Google: Gemma 3 27B\u001b[K\u001b[11;3Hgoogle/gemma-4-31b-it — Google: Gemma 4 31B\u001b[12;3Hgryphe/mythomax-l2-13b — MythoMax 13B\u001b[K\u001b[13;3Hgoogle/gemini-2.5-flash — Google: Gemini 2.5 Flash\u001b[14;3Hgoogle/gemini-3.5-flash — Google: Gemini 3.5 Flash\u001b[15;3Hgoogle/gemini-3.6-flash — Google: Gemini 3.6 Flash\u001b[K\u001b[17;18H-pro-image — Google: Nano Banana Pro (Gemini 3 Pro Image)\u001b[18;3Hgoogle/gemma-4-26b-a4b-it — Google: Gemma 4 26B A4B\u001b[K\u001b[19;3Hgoogle/gemma-4-31b-it:free — Google: Gemma 4 31B (free)\u001b[20;3Hgoogle/lyria-3-pro-preview — Google: Lyria 3 Pro Preview\u001b[K\u001b[3;10H\u001b[13;20r\u001b[13;1H\u001bM\u001b[1;34r\u001b[6;13r\u001b[6;1H\u001b[2T\u001b[1;34r\u001b[3;10He\r\u001b[6d○ upstage/solar-pro4 — Upstage: Solar Pro 4\r\u001b[7d○ upstage/solar-pro-3 — Upstage: Solar Pro 3\u001b[3;11H\r\u001b[6d\u001b[2M\u001b[3;11Hm\r\u001b[19d○ google/gemini-2.5-pro:batch — Google: Gemini 2.5 Pro (batch)\r\u001b[20d○ google/gemini-2.5-flash-lite — Google: Gemini 2.5 Flash Lite\u001b[3;12H\u001b[6;16r\u001b[16;1H\u001b[5S\u001b[1;34r\u001b[12;1H\u001b[7M\u001b[3;12Hi\u001b[6dini-2.5-pro\u001b[6;38Hini 2.5 Pro\r\u001b[14d○ google/gemini-3.1-flash-lite — Google: Gemini 3.1 Flash Lite\r\u001b[15d○ google/gemini-3.5-flash-lite — Google: Gemini 3.5 Flash Lite\r\u001b[16d○ google/gemini-2.5-flash-image — Google: Nano Banana (Gemini 2.5 Flash Image)\r\u001b[17d○ google/gemini-2.5-flash:batch — Google: Gemini 2.5 Flash (batch)\r\u001b[18d○ google/gemini-2.5-pro-preview — Google: Gemini 2.5 Pro Preview 06-05\r\u001b[19d○ google/gemini-3-flash-preview — Google: Gemini 3 Flash Preview\r\u001b[20d○ google/gemini-3.1-flash-image — Google: Nano Banana 2 (Gemini 3.1 Flash Image)\u001b[3;13Hni-\u001b[6;11r\u001b[11;1H\u001b[2S\u001b[1;34r\u001b[11;1H\u001b[7M\u001b[3;16H3\r\u001b[10d○ google/gemini-3.1-flash-lite — Google: Gemini 3.1 Flash Lite\u001b[11;17H3.5-flash-lite — Google: Gemini 3.5 Flash Lite\u001b[K\r\u001b[14d○ google/gemini-3.1-pro-preview — Google: Gemini 3.1 Pro Preview\r\u001b[15d○ google/gemini-3.5-flash:batch — Google: Gemini 3.5 Flash (batch)\r\u001b[16d○ google/gemini-3.6-flash:batch — Google: Gemini 3.6 Flash (batch)\r\u001b[17d○ google/gemini-3.7-flash:batch — Google: Gemini 3.7 Flash (batch)\r\u001b[18d○ google/gemini-3-pro-image-preview — Google: Nano Banana Pro (Gemini 3 Pro Image Preview)\r\u001b[19d○ google/gemini-3.1-flash-lite-image — Google: Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)\r\u001b[20d○ google/gemini-3.1-flash-lite:batch — Google: Gemini 3.1 Flash Lite (batch)\u001b[3;17H\u001b[11;17r\u001b[17;1H\u001b[2S\u001b[1;34r\u001b[16;1H\u001b[3M\u001b[3;17H.\u001b[9d.1-flash-lite — Google: Gemini 3.1 Flash Lite\u001b[K\u001b[10;19H5\u001b[10;51H5\r\u001b[18d○ google/gemini-3.5-flash-lite:batch — Google: Gemini 3.5 Flash Lite (batch)\r\u001b[19d○ google/gemini-3.1-pro-preview:batch — Google: Gemini 3.1 Pro Preview (batch)\r\u001b[20d○ google/gemini-3.1-flash-lite-preview — Google: Gemini 3.1 Flash Lite Preview\u001b[3;18H\r\u001b[9d\u001b[8M\u001b[3;18H1\u001b[6d1\u001b[26G-lite — Google: Gemini 3.1 Flash Lite\u001b[7;19H1\u001b[26G-image — Google: Nano Banana 2 (Gemini 3.1 Flash Image)\u001b[8;19H1-pro-preview — Google: Gemini 3.1 Pro Preview\u001b[9;31H-image\u001b[9;48HNan"]
7
+ [4.565944,"o","o Banana 2 Lite (Gemini 3.1 Flash Lite Image)\u001b[10;19H1\u001b[10;57H1\r\u001b[13d○ google/gemini-3.1-flash-image-preview — Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)\r\u001b[14d○ google/gemini-3.1-pro-preview-customtools — Google: Gemini 3.1 Pro Preview Custom Tools\u001b[3;19H-\r\u001b[8d\u001b[6M\u001b[3;20Hp\u001b[6dpro-preview — Google: Gemini 3.1 Pro Preview\u001b[7;21Hpro-preview:batch — Google: Gemini 3.1 Pro Preview (batch)\u001b[K\u001b[3;21Hro-preview\u001b[?25l\r\u001b[4d↑/↓ move · Enter/Space select · / search · s save · q cancel\r\u001b[6d\u001b(B\u001b[0;7m○ google/gemini-3.1-pro-preview — Google: Gemini 3.1 Pro Preview\u001b[8;90H\u001b(B\u001b[m\u001b[5;11H\u001b(B\u001b[0;1m2\r\u001b[6d\u001b(B\u001b[0;7m●\u001b[8;90H\u001b(B\u001b[m\u001b[?1l\u001b>\u001b[34;1H\u001b[?12l\u001b[?25h\u001b[?1049l\u001b[23;0;0t\r\u001b[?1l\u001b>"]
8
+ [4.578197,"o","OpenRouter credential: ~/.config/claude-openrouter/credential (mode 0600)\r\r\nModel index: ~/.cache/claude-openrouter/models.json (417 models)\r\r\nClaude Code settings: ~/.claude/settings.json\r\r\nFavorites:\r\r\n - anthropic/claude-sonnet-4.6\r\r\n - google/gemini-3.1-pro-preview\r\r\n\r\r\nRestart Claude Code, then use /model to switch favorites.\r\r\n"]
9
+ [4.593833,"o","\u001b[?2004hdemo ❯ "]
10
+ [5.294922,"o","clor search 'anthropic/*sonnet*'\r\r\n\u001b[?2004l\r"]
11
+ [5.502697,"o","MODEL\tNAME\tCONTEXT\r\r\nanthropic/claude-sonnet-4\tAnthropic: Claude Sonnet 4\t1,000,000\r\r\nanthropic/claude-sonnet-5\tAnthropic: Claude Sonnet 5\t1,000,000\r\r\nanthropic/claude-sonnet-4.5\tAnthropic: Claude Sonnet 4.5\t1,000,000\r\r\nanthropic/claude-sonnet-4.6\tAnthropic: Claude Sonnet 4.6\t1,000,000\r\r\nanthropic/claude-sonnet-5:batch\tAnthropic: Claude Sonnet 5 (batch)\t1,000,000\r\r\nanthropic/claude-sonnet-4.5:batch\tAnthropic: Claude Sonnet 4.5 (batch)\t1,000,000\r\r\nanthropic/claude-sonnet-4.6:batch\tAnthropic: Claude Sonnet 4.6 (batch)\t1,000,000\r\r\nRefreshed 417 models; 7 matched.\r\r\n"]
12
+ [5.514194,"o","\u001b[?2004hdemo ❯ "]
13
+ [6.421449,"o","claude --bare\r\r\n\u001b[?2004l\r"]
14
+ [6.852139,"o","\u001b7\u001b[r\u001b8\u001b[?25h"]
15
+ [6.948467,"o","\u001b[?25l\u001b[?2004h\u001b[?1004h\u001b[?2031h"]
16
+ [6.949876,"o","\u001b]0;✳ Claude Code\u0007"]
17
+ [6.998272,"o","\u001b[2G▐▛███▛█\u001b[12GClaude\u001b[19GCode\u001b[24Gv2.1.246\r\r\r\n▝▜██████▀\u001b[12GAnthropic:\u001b[23GClaude\u001b[30GSonnet\u001b[37G4.6\u001b[41G·\u001b[43GAPI\u001b[47GUsage\u001b[53GBilling\r\r\r\n\u001b[3G▝▝\u001b[6G▝▝\u001b[12G~/dev/agent-projects/claude-openrouter\r\r\r\n\r\r\r\n\u001b[2G⚠\u001b[4GClaude\u001b[11GSonnet\u001b[18G4\u001b[20Gretired\u001b[28GJune\u001b[33G15,\u001b[37G2026\u001b[42G·\u001b[44G/model\u001b[51Gto\u001b[54Gswitch\r\r\r\n\r\r\r\n────────────────────────────────────────────────────────────────────────────────────────────────────\r\r\r\n❯ \u001b[7m \u001b[27m\r\r\r\n────────────────────────────────────────────────────────────────────────────────────────────────────\r\r\r\n\u001b[3G⏸\u001b[5Gmanual\u001b[12Gmode\u001b[17Gon\u001b[20G·\u001b[22G?\u001b[24Gfor\u001b[28Gshortcuts\u001b[38G·\u001b[40G←\u001b[42Gfor\u001b[46Gagents\r\r\r\n\u001b[15G⚠\u001b[17GClaude\u001b[24GSonnet\u001b[31G4\u001b[33Gwas\u001b[37Gretired\u001b[45Gon\u001b[48GJune\u001b[53G15,\u001b[57G2026.\u001b[63GConsider\u001b[72Gswitching\u001b[82Gto\u001b[85Ga\u001b[87Gnewer\u001b[93Gmodel.\r\r\r\n\u001b[2C\u001b[4A"]
18
+ [7.046711,"o","\u001b[>0q\u001b[c"]
19
+ [14.983756,"o","\u001b[2D\u001b[4B\u001b[2K\u001b[G\u001b[1A\u001b[K\u001b[2C\u001b[3A"]
20
+ [53.385898,"o","\u001b(B\u000f"]
21
+ [53.419461,"o","\u001b[2D\u001b[3B\r\u001b[4A❯ /model\u001b[K\r\u001b[1B\u001b[K\r\u001b[2C\u001b[2BSelect model\u001b[K\r\r\r\n\u001b[3GSwitch\u001b[10Gbetween\u001b[18GClaude\u001b[25Gmodels.\u001b[33GYour\u001b[38Gpick\u001b[43Gbecomes\u001b[51Gthe\u001b[55Gdefault\u001b[63Gfor\u001b[67Gnew\u001b[71Gsessions.\u001b[81GFor\u001b[85Gother/previous\r\r\r\n\u001b[3Gmodel\u001b[9Gnames,\u001b[16Gspecify\u001b[24Gwith\u001b[29G--model.\r\r\r\n\r\r\r\n\u001b[5G1.\u001b[8GDefault\u001b[16G(recommended)\u001b[40GUse\u001b[44Gthe\u001b[48Gdefault\u001b[56Gmodel\u001b[62G(currently\u001b[73GOpus\u001b[78G5\u001b[80G(1M\u001b[84Gcontext))\u001b[94G·\r\r\r\n\u001b[40G$5/$25\u001b[47Gper\u001b[51GMtok\r\r\r\n\u001b[5G2.\u001b[8GGoogle:\u001b[16GGemini\u001b[23G3.1\u001b[27GPro\u001b[31GPreview\u001b[40Ggoogle/gemini-3.1-pro-preview\u001b[70G·\u001b[72GOpenRouter\u001b[83Gvia\r\r\r\n\u001b[40Gclaude-openrouter\u001b[58G·\u001b[60G1048K\u001b[66Gcontext\u001b[74G·\u001b[76G$2/M\u001b[81Ginput\u001b[87G·\u001b[89G$12/M\r\r\r\n\u001b[40Goutput\r\r\r\n\u001b[3G❯\u001b[5G3.\u001b[8GSonnet\u001b[15G4\u001b[17G✔\u001b[40GNewer\u001b[46Gversion\u001b[54Gavailable\u001b[64G·\u001b[66Gselect\u001b[73GSonnet\u001b[80Gfor\u001b[84GSonnet\u001b[91G5\r\r\r\n\r\r\r\n\u001b[3G○\u001b[5GEffort\u001b[12Gnot\u001b[16Gsupported\u001b[26Gfor\u001b[30GSonnet\u001b[37G4\r\r\r\n\r\r\r\n\u001b[3GEnter\u001b[9Gto\u001b[12Gset\u001b[16Gas\u001b[19Gdefault\u001b[27G·\u001b[29Gs\u001b[31Gto\u001b[34Guse\u001b[38Gthis\u001b[43Gsession\u001b[51Gonly\u001b[56G·\u001b[58GEsc\u001b[62Gto\u001b[65Gcancel\r\r\r\n\u001b[2C\u001b[5A"]