11<div align =" center " >
22
3- <img src =" https://capsule-render.vercel.app/api?type=waving&color=0:0d1117,50:1a1b2e,100:2d1b69&height=180§ ion=header&text=OpenRouter%20Pipe&fontColor=a78bfa&fontSize=42&animation=fadeIn&fontAlignY=36&desc=Open%20WebUI%20%E2%86%94%20OpenRouter%20Integration&descAlignY=56&descColor=8b5cf6 " width =" 100% " />
4-
5- <br >
6-
7- [ ![ Typing SVG] ( https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=500&size=20&duration=3000&pause=1000&color=A78BFA¢er=true&vCenter=true&multiline=true&repeat=true&width=600&height=60&lines=Manifold+Pipe+for+Open+WebUI;All+OpenRouter+models+%E2%80%A2+one+integration )] ( https://openrouter.ai )
8-
9- <br >
10-
113<a href =" https://github.com/sena-labs/Open-Router-Pipe " ><img src =" https://img.shields.io/badge/version-0.2.0-0d1117?style=for-the-badge&labelColor=7c3aed&color=0d1117 " alt =" version " ></a >  ;
124<a href =" https://www.python.org/ " ><img src =" https://img.shields.io/badge/python-≥3.10-0d1117?style=for-the-badge&logo=python&logoColor=white&labelColor=3776AB " alt =" python " ></a >  ;
135<a href =" LICENSE " ><img src =" https://img.shields.io/badge/license-MIT-0d1117?style=for-the-badge&labelColor=blue " alt =" license " ></a >  ;
146<a href =" https://docs.openwebui.com " ><img src =" https://img.shields.io/badge/Open%20WebUI-compatible-0d1117?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0wIDE4Yy00LjQyIDAtOC0zLjU4LTgtOHMzLjU4LTggOC04IDggMy41OCA4IDgtMy41OCA0LTggOHoiLz48L3N2Zz4=&logoColor=white&labelColor=1a1a2e " alt =" openwebui " ></a >
157
16- <br ><br >
17-
18- ** Access 300+ AI models through OpenRouter directly inside Open WebUI.**
19- <br >
20- ** Provider routing • Reasoning tokens • Streaming • Fallbacks • Cache control**
21-
22- <br >
8+ </div >
239
24- <kbd >[ ⚡ Quick Start] ( #-quick-start ) </kbd >  ;  ;
25- <kbd >[ ⚙️ Configuration] ( #%EF%B8%8F-configuration ) </kbd >  ;  ;
26- <kbd >[ 🧠 Features] ( #-features ) </kbd >  ;  ;
27- <kbd >[ 📖 API Reference] ( #-api-reference ) </kbd >  ;  ;
28- <kbd >[ 🤝 Contributing] ( #-contributing ) </kbd >
10+ # OpenRouter Pipe
2911
30- </ div >
12+ ** Access 300+ AI models through OpenRouter directly inside Open WebUI. **
3113
32- < br >
14+ Provider routing · Reasoning tokens · Streaming · Fallbacks · Cache control
3315
3416---
3517
36- ## ⚡ Quick Start
18+ ## Quick Start
3719
3820### Prerequisites
3921
48304 . Paste the entire contents of [ ` openrouter_pipe.py ` ] ( openrouter_pipe.py )
49315 . Save and ** enable** the function
50326 . Go to ** Valves** (⚙️ icon) and enter your ` OPENROUTER_API_KEY `
51- 7 . All OpenRouter models will appear in your model selector 🎉
33+ 7 . All OpenRouter models will appear in your model selector
5234
5335> ** Tip:** You can also set the API key via environment variable ` OPENROUTER_API_KEY ` on the server.
5436
37+ Alternatively, search for ** "OpenRouter Pipe"** on [ openwebui.com] ( https://openwebui.com ) and install it directly from the community hub.
38+
5539---
5640
57- ## 🧠 Features
41+ ## Features
5842
5943| Feature | Description |
6044| ---------| -------------|
7256
7357---
7458
75- ## ⚙️ Configuration
59+ ## Configuration
7660
7761All settings are configurable via ** Valves** in the Open WebUI admin panel. Every valve also accepts an environment variable fallback.
7862
@@ -126,7 +110,7 @@ All settings are configurable via **Valves** in the Open WebUI admin panel. Ever
126110
127111---
128112
129- ## 📖 API Reference
113+ ## API Reference
130114
131115### Architecture
132116
@@ -161,13 +145,13 @@ It also removes `user` when sent as a dict (OWUI format) since OpenRouter expect
161145
162146---
163147
164- ## 🏗️ Project Structure
148+ ## Project Structure
165149
166150```
167151Open-Router-Pipe/
168152├── openrouter_pipe.py # Main pipe source (install this in Open WebUI)
169153├── function.json # Open WebUI community manifest (metadata, tags, categories)
170- ├── test_pipe.py # Comprehensive test suite (131 tests)
154+ ├── test_pipe.py # Test suite
171155├── README.md # This file
172156├── CHANGELOG.md # Version history
173157├── CONTRIBUTING.md # Contribution guidelines
@@ -177,22 +161,15 @@ Open-Router-Pipe/
177161
178162---
179163
180- ## 🧪 Testing
181-
182- The project includes a comprehensive test suite covering all functionality:
164+ ## Testing
183165
184166``` bash
185167python test_pipe.py
186168```
187169
188- ```
189- Total: 131 | ✓ Passed: 131 | ✗ Failed: 0
190- All tests passed! ✓
191- ```
192-
193170Tests cover:
194171- Helper functions (` _insert_citations ` , ` _format_citation_list ` , ` _parse_csv ` )
195- - All 17 Valve defaults and validation
172+ - Valve defaults and validation
196173- Payload preparation (key stripping, model ID fix, provider routing, fallbacks)
197174- Stream response (reasoning tags, mid-stream errors, auto-close, citations)
198175- Non-stream response (API errors, empty choices, timeout handling)
@@ -202,25 +179,13 @@ Tests cover:
202179
203180---
204181
205- ## 🌐 Open WebUI Community
206-
207- This pipe is available on the ** [ Open WebUI Community] ( https://openwebui.com ) ** site.
208-
209- ### Install from Community
210-
211- 1 . Go to [ openwebui.com] ( https://openwebui.com ) and search for ** "OpenRouter Pipe"**
212- 2 . Click ** Install** to add it directly to your Open WebUI instance
213- 3 . Configure your ` OPENROUTER_API_KEY ` in the Valves settings
214-
215- ---
216-
217- ## 🤝 Contributing
182+ ## Contributing
218183
219184Contributions are welcome! See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for details.
220185
221186---
222187
223- ## 📄 License
188+ ## License
224189
225190This project is licensed under the ** MIT License** — see the [ LICENSE] ( LICENSE ) file for details.
226191
@@ -232,8 +197,6 @@ Copyright (c) 2026 Sena Labs
232197
233198<div align =" center " >
234199
235- <img src =" https://capsule-render.vercel.app/api?type=waving&color=0:2d1b69,50:1a1b2e,100:0d1117&height=100§ ion=footer " width =" 100% " />
236-
237- ** Built with 💜 by [ Sena Labs] ( https://github.com/sena-labs ) **
200+ [ Sena Labs] ( https://github.com/sena-labs )
238201
239202</div >
0 commit comments