CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 20:40:10 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/simonw/llm-openrouter.git
etag: W/"d992a45697f62b1456c59623f8645471"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=%2BaFQxdq9qc%2BKtOQWu4LCbRX4Y%2F%2F1d0AG1eQxzk%2FFRWMCkW8TQastIveFkel1D8kxxEcfgiCsi2mvjPB58BZIFXqhxpPw5GBnYW2AUG6KwUODRAiyTRkywZdW6OtDaBpoe6CAOlP4G5s%2B4jtFICo%2Bd0tv7PimdYZwK5rnWWbfLOMVCJ8GIUTbc%2FoGQe%2ByO%2Bf1NTkpwBrCMhL6FgTSS8juyzv2j7sE5wkKO%2Brn5KchD5EfzY6LA9DMnZ92jO%2FMmG7yT6DUCENke2h11VFZ2%2FNTvg%3D%3D--Q2NoDyX45k2R5IeU--Xskr8izd6ZiCOLmGsVKiNg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.187051987.1760215209; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 20:40:09 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 20:40:09 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BBD6:9DC1D:9F14C9:D18DE1:68EAC0A9
Tool support (#43) · simonw/llm-openrouter@603cd08 · GitHub
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_image_prompt.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_llm_models.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_prompt.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_tool_calls.yaml
Copy file name to clipboard
Copy file name to clipboardExpand all lines: tests/test_llm_openrouter.py
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit 603cd08
Tool support (#43)
* Add tool support
* Simplify schema and vision support
* claude-2 no longer in models
* Only save a truncated recording of the models supported by OpenRouter
* Refresh models output in cassettes
* Auto-updated snapshot tests against new cassettes
* Add tool call test
* Bump minimum LLM version
To avoid error about supports_tools= parameter in constructor
---------
Co-authored-by: Simon Willison <swillison@gmail.com>1 parent 4702580 commit 603cd08Copy full SHA for 603cd08
File tree
Expand file treeCollapse file tree
10 files changed
+875
-3679
lines changedFilter options
- tests
- cassettes/test_llm_openrouter
Expand file treeCollapse file tree
10 files changed
+875
-3679
lines changedCollapse file: README.md
+5-3Lines changed: 5 additions & 3 deletions
- Display the source diff
- Display the rich diff
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
| 41 | + | |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| |||
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
| 269 | + | |
| 270 | + |
Collapse file: llm_openrouter.py
+18-24Lines changed: 18 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 | 19 |
| |
31 | 20 |
| |
32 | 21 |
| |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 |
| |
34 | 37 |
| |
35 | 38 |
| |
| |||
125 | 128 |
| |
126 | 129 |
| |
127 | 130 |
| |
128 |
| - | |
| 131 | + | |
| 132 | + | |
129 | 133 |
| |
130 | 134 |
| |
131 | 135 |
| |
| |||
176 | 180 |
| |
177 | 181 |
| |
178 | 182 |
| |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 | 183 |
| |
191 | 184 |
| |
192 | 185 |
| |
| |||
225 | 218 |
| |
226 | 219 |
| |
227 | 220 |
| |
228 |
| - | |
| 221 | + | |
| 222 | + | |
229 | 223 |
| |
230 | 224 |
| |
231 | 225 |
| |
|
Collapse file: pyproject.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
|
Collapse file: tests/cassettes/test_llm_openrouter/test_image_prompt.yaml
tests/cassettes/test_llm_openrouter/test_image_prompt.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_image_prompt.yaml+140-1,221Lines changed: 140 additions & 1221 deletions
Large diffs are not rendered by default.
Collapse file: tests/cassettes/test_llm_openrouter/test_llm_models.yaml
tests/cassettes/test_llm_openrouter/test_llm_models.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_llm_models.yaml+102-1,194Lines changed: 102 additions & 1194 deletions
Large diffs are not rendered by default.
Collapse file: tests/cassettes/test_llm_openrouter/test_prompt.yaml
tests/cassettes/test_llm_openrouter/test_prompt.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_prompt.yaml+132-1,222Lines changed: 132 additions & 1222 deletions
Large diffs are not rendered by default.
Collapse file: tests/cassettes/test_llm_openrouter/test_tool_calls.yaml
tests/cassettes/test_llm_openrouter/test_tool_calls.yaml
Copy file name to clipboardExpand all lines: tests/cassettes/test_llm_openrouter/test_tool_calls.yaml+362Lines changed: 362 additions & 0 deletions
Large diffs are not rendered by default.
Collapse file: tests/conftest.py
+11-1Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
| 4 | + | |
3 | 5 |
| |
4 | 6 |
| |
5 | 7 |
| |
6 | 8 |
| |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 |
| |
8 | 14 |
| |
9 |
| - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 |
| |
11 | 21 |
| |
12 | 22 |
| |
|
Collapse file: tests/models_persister.py
tests/models_persister.py
Copy file name to clipboard+31Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + |
Collapse file: tests/test_llm_openrouter.py
tests/test_llm_openrouter.py
Copy file name to clipboardExpand all lines: tests/test_llm_openrouter.py+73-13Lines changed: 73 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
| 27 | + | |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
| 36 | + | |
| 37 | + | |
37 | 38 |
| |
38 | 39 |
| |
39 | 40 |
| |
40 |
| - | |
| 41 | + | |
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
| |||
49 | 50 |
| |
50 | 51 |
| |
51 | 52 |
| |
52 |
| - | |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
| |||
62 | 63 |
| |
63 | 64 |
| |
64 | 65 |
| |
65 |
| - | |
| 66 | + | |
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
70 |
| - | |
| 71 | + | |
71 | 72 |
| |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
75 |
| - | |
76 |
| - | |
| 76 | + | |
| 77 | + | |
77 | 78 |
| |
78 | 79 |
| |
79 |
| - | |
| 80 | + | |
| 81 | + | |
80 | 82 |
| |
81 | 83 |
| |
82 | 84 |
| |
83 |
| - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
84 | 144 |
| |
85 | 145 |
|
You can’t perform that action at this time.
0 commit comments