Compare commits
4 Commits
v2026.02.0
...
v2026.02.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
409d2f663f | ||
|
|
de9948a5b0 | ||
|
|
0a51b4cfca | ||
|
|
f8eb096300 |
20
README.md
20
README.md
@@ -10,28 +10,28 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
|
||||
<!-- STATS_START -->
|
||||
## 📊 Community Stats
|
||||
|
||||
> 🕐 Auto-updated: 2026-02-07 17:12
|
||||
> 🕐 Auto-updated: 2026-02-08 07:12
|
||||
|
||||
| 👤 Author | 👥 Followers | ⭐ Points | 🏆 Contributions |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **204** | **257** | **41** |
|
||||
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **205** | **258** | **42** |
|
||||
|
||||
| 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves |
|
||||
|:---:|:---:|:---:|:---:|:---:|
|
||||
| **20** | **3711** | **43662** | **220** | **256** |
|
||||
| **20** | **3779** | **44354** | **221** | **258** |
|
||||
|
||||
### 🔥 Top 6 Popular Plugins
|
||||
|
||||
> 🕐 Auto-updated: 2026-02-07 17:12
|
||||
> 🕐 Auto-updated: 2026-02-08 07:12
|
||||
|
||||
| Rank | Plugin | Version | Downloads | Views | Updated |
|
||||
|:---:|------|:---:|:---:|:---:|:---:|
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.2 | 883 | 7810 | 2026-01-28 |
|
||||
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.5.0 | 635 | 5880 | 2026-01-30 |
|
||||
| 🥉 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.3 | 347 | 2686 | 2026-01-28 |
|
||||
| 4️⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.2 | 330 | 3436 | 2026-01-28 |
|
||||
| 5️⃣ | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 327 | 1520 | 2026-01-29 |
|
||||
| 6️⃣ | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | 1.2.4 | 294 | 4270 | 2026-01-29 |
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.2 | 890 | 7901 | 2026-01-28 |
|
||||
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.5.0 | 645 | 6010 | 2026-01-30 |
|
||||
| 🥉 | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.4 | 358 | 2766 | 2026-02-07 |
|
||||
| 4️⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.2 | 336 | 3485 | 2026-01-28 |
|
||||
| 5️⃣ | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 330 | 1541 | 2026-01-29 |
|
||||
| 6️⃣ | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | 1.2.4 | 298 | 4320 | 2026-01-29 |
|
||||
|
||||
*See full stats in [Community Stats Report](./docs/community-stats.md)*
|
||||
<!-- STATS_END -->
|
||||
|
||||
20
README_CN.md
20
README_CN.md
@@ -7,28 +7,28 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
|
||||
<!-- STATS_START -->
|
||||
## 📊 社区统计
|
||||
|
||||
> 🕐 自动更新于 2026-02-07 17:12
|
||||
> 🕐 自动更新于 2026-02-08 07:12
|
||||
|
||||
| 👤 作者 | 👥 粉丝 | ⭐ 积分 | 🏆 贡献 |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **204** | **257** | **41** |
|
||||
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **205** | **258** | **42** |
|
||||
|
||||
| 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 |
|
||||
|:---:|:---:|:---:|:---:|:---:|
|
||||
| **20** | **3711** | **43662** | **220** | **256** |
|
||||
| **20** | **3779** | **44354** | **221** | **258** |
|
||||
|
||||
### 🔥 热门插件 Top 6
|
||||
|
||||
> 🕐 自动更新于 2026-02-07 17:12
|
||||
> 🕐 自动更新于 2026-02-08 07:12
|
||||
|
||||
| 排名 | 插件 | 版本 | 下载 | 浏览 | 更新日期 |
|
||||
|:---:|------|:---:|:---:|:---:|:---:|
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.2 | 883 | 7810 | 2026-01-28 |
|
||||
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.5.0 | 635 | 5880 | 2026-01-30 |
|
||||
| 🥉 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.3 | 347 | 2686 | 2026-01-28 |
|
||||
| 4️⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.2 | 330 | 3436 | 2026-01-28 |
|
||||
| 5️⃣ | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 327 | 1520 | 2026-01-29 |
|
||||
| 6️⃣ | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | 1.2.4 | 294 | 4270 | 2026-01-29 |
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.2 | 890 | 7901 | 2026-01-28 |
|
||||
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.5.0 | 645 | 6010 | 2026-01-30 |
|
||||
| 🥉 | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.4 | 358 | 2766 | 2026-02-07 |
|
||||
| 4️⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.2 | 336 | 3485 | 2026-01-28 |
|
||||
| 5️⃣ | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 330 | 1541 | 2026-01-29 |
|
||||
| 6️⃣ | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | 1.2.4 | 298 | 4320 | 2026-01-29 |
|
||||
|
||||
*完整统计请查看 [社区统计报告](./docs/community-stats.zh.md)*
|
||||
<!-- STATS_END -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "downloads",
|
||||
"message": "3.7k",
|
||||
"message": "3.8k",
|
||||
"color": "blue",
|
||||
"namedLogo": "openwebui"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "followers",
|
||||
"message": "204",
|
||||
"message": "205",
|
||||
"color": "blue"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "points",
|
||||
"message": "257",
|
||||
"message": "258",
|
||||
"color": "orange"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "upvotes",
|
||||
"message": "220",
|
||||
"message": "221",
|
||||
"color": "brightgreen"
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"total_posts": 20,
|
||||
"total_downloads": 3711,
|
||||
"total_views": 43662,
|
||||
"total_upvotes": 220,
|
||||
"total_downloads": 3779,
|
||||
"total_views": 44354,
|
||||
"total_upvotes": 221,
|
||||
"total_downvotes": 2,
|
||||
"total_saves": 256,
|
||||
"total_comments": 47,
|
||||
"total_saves": 258,
|
||||
"total_comments": 49,
|
||||
"by_type": {
|
||||
"pipe": 1,
|
||||
"action": 14,
|
||||
"pipe": 1,
|
||||
"unknown": 4,
|
||||
"filter": 1
|
||||
},
|
||||
@@ -20,10 +20,10 @@
|
||||
"version": "0.9.2",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Intelligently analyzes text content and generates interactive mind maps to help users structure and visualize knowledge.",
|
||||
"downloads": 883,
|
||||
"views": 7810,
|
||||
"downloads": 890,
|
||||
"views": 7901,
|
||||
"upvotes": 22,
|
||||
"saves": 48,
|
||||
"saves": 49,
|
||||
"comments": 13,
|
||||
"created_at": "2025-12-30",
|
||||
"updated_at": "2026-01-28",
|
||||
@@ -36,8 +36,8 @@
|
||||
"version": "1.5.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "AI-powered infographic generator based on AntV Infographic. Supports professional templates, auto-icon matching, and SVG/PNG downloads.",
|
||||
"downloads": 635,
|
||||
"views": 5880,
|
||||
"downloads": 645,
|
||||
"views": 6010,
|
||||
"upvotes": 24,
|
||||
"saves": 33,
|
||||
"comments": 10,
|
||||
@@ -46,19 +46,19 @@
|
||||
"url": "https://openwebui.com/posts/smart_infographic_ad6f0c7f"
|
||||
},
|
||||
{
|
||||
"title": "Export to Word (Enhanced)",
|
||||
"title": "Export to Word Enhanced",
|
||||
"slug": "export_to_word_enhanced_formatting_fca6a315",
|
||||
"type": "action",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Export current conversation from Markdown to Word (.docx) with Mermaid diagrams rendered client-side (Mermaid.js, SVG+PNG), LaTeX math, real hyperlinks, improved tables, syntax highlighting, and blockquote support.",
|
||||
"downloads": 347,
|
||||
"views": 2686,
|
||||
"downloads": 358,
|
||||
"views": 2766,
|
||||
"upvotes": 14,
|
||||
"saves": 26,
|
||||
"comments": 2,
|
||||
"comments": 3,
|
||||
"created_at": "2026-01-03",
|
||||
"updated_at": "2026-01-28",
|
||||
"updated_at": "2026-02-07",
|
||||
"url": "https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315"
|
||||
},
|
||||
{
|
||||
@@ -68,8 +68,8 @@
|
||||
"version": "1.2.2",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Reduces token consumption in long conversations while maintaining coherence through intelligent summarization and message compression.",
|
||||
"downloads": 330,
|
||||
"views": 3436,
|
||||
"downloads": 336,
|
||||
"views": 3485,
|
||||
"upvotes": 14,
|
||||
"saves": 33,
|
||||
"comments": 0,
|
||||
@@ -84,8 +84,8 @@
|
||||
"version": "0.3.7",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Extracts tables from chat messages and exports them to Excel (.xlsx) files with smart formatting.",
|
||||
"downloads": 327,
|
||||
"views": 1520,
|
||||
"downloads": 330,
|
||||
"views": 1541,
|
||||
"upvotes": 7,
|
||||
"saves": 6,
|
||||
"comments": 0,
|
||||
@@ -100,8 +100,8 @@
|
||||
"version": "1.2.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "A content normalizer filter that fixes common Markdown formatting issues in LLM outputs, such as broken code blocks, LaTeX formulas, and list formatting.",
|
||||
"downloads": 294,
|
||||
"views": 4270,
|
||||
"downloads": 298,
|
||||
"views": 4320,
|
||||
"upvotes": 17,
|
||||
"saves": 27,
|
||||
"comments": 5,
|
||||
@@ -116,8 +116,8 @@
|
||||
"version": "0.2.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Quickly generates beautiful flashcards from text, extracting key points and categories.",
|
||||
"downloads": 213,
|
||||
"views": 3247,
|
||||
"downloads": 214,
|
||||
"views": 3265,
|
||||
"upvotes": 13,
|
||||
"saves": 14,
|
||||
"comments": 2,
|
||||
@@ -132,8 +132,8 @@
|
||||
"version": "",
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 153,
|
||||
"views": 2234,
|
||||
"downloads": 157,
|
||||
"views": 2317,
|
||||
"upvotes": 8,
|
||||
"saves": 3,
|
||||
"comments": 0,
|
||||
@@ -148,8 +148,8 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "A comprehensive thinking lens that dives deep into any content - from context to logic, insights, and action paths.",
|
||||
"downloads": 134,
|
||||
"views": 1162,
|
||||
"downloads": 137,
|
||||
"views": 1176,
|
||||
"upvotes": 6,
|
||||
"saves": 11,
|
||||
"comments": 0,
|
||||
@@ -158,21 +158,37 @@
|
||||
"url": "https://openwebui.com/posts/deep_dive_c0b846e4"
|
||||
},
|
||||
{
|
||||
"title": "导出为 Word (增强版)",
|
||||
"title": "导出为Word增强版",
|
||||
"slug": "导出为_word_支持公式流程图表格和代码块_8a6306c0",
|
||||
"type": "action",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "将对话导出为 Word (.docx),支持 Mermaid 图表 (客户端渲染 SVG+PNG)、LaTeX 数学公式、真实超链接、增强表格格式、代码高亮和引用块。",
|
||||
"downloads": 119,
|
||||
"views": 2111,
|
||||
"views": 2126,
|
||||
"upvotes": 13,
|
||||
"saves": 6,
|
||||
"comments": 4,
|
||||
"created_at": "2026-01-04",
|
||||
"updated_at": "2026-01-28",
|
||||
"updated_at": "2026-02-07",
|
||||
"url": "https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0"
|
||||
},
|
||||
{
|
||||
"title": "GitHub Copilot Official SDK Pipe",
|
||||
"slug": "github_copilot_official_sdk_pipe_ce96f7b4",
|
||||
"type": "pipe",
|
||||
"version": "0.3.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Integrate GitHub Copilot SDK. Supports dynamic models, multi-turn conversation, streaming, multimodal input, infinite sessions, and frontend debug logging.",
|
||||
"downloads": 65,
|
||||
"views": 1963,
|
||||
"upvotes": 13,
|
||||
"saves": 6,
|
||||
"comments": 2,
|
||||
"created_at": "2026-01-26",
|
||||
"updated_at": "2026-02-07",
|
||||
"url": "https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4"
|
||||
},
|
||||
{
|
||||
"title": "智能信息图",
|
||||
"slug": "智能信息图_e04a48ff",
|
||||
@@ -180,8 +196,8 @@
|
||||
"version": "1.5.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "基于 AntV Infographic 的智能信息图生成插件。支持多种专业模板,自动图标匹配,并提供 SVG/PNG 下载功能。",
|
||||
"downloads": 56,
|
||||
"views": 1006,
|
||||
"downloads": 58,
|
||||
"views": 1017,
|
||||
"upvotes": 10,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
@@ -196,8 +212,8 @@
|
||||
"version": "0.1.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Automatically extracts project rules from conversations and injects them into the folder's system prompt.",
|
||||
"downloads": 56,
|
||||
"views": 1209,
|
||||
"downloads": 57,
|
||||
"views": 1229,
|
||||
"upvotes": 6,
|
||||
"saves": 8,
|
||||
"comments": 0,
|
||||
@@ -205,22 +221,6 @@
|
||||
"updated_at": "2026-01-20",
|
||||
"url": "https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2"
|
||||
},
|
||||
{
|
||||
"title": "GitHub Copilot Official SDK Pipe",
|
||||
"slug": "github_copilot_official_sdk_pipe_ce96f7b4",
|
||||
"type": "pipe",
|
||||
"version": "0.3.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Integrate GitHub Copilot SDK. Supports dynamic models, multi-turn conversation, streaming, multimodal input, infinite sessions, and frontend debug logging.",
|
||||
"downloads": 52,
|
||||
"views": 1882,
|
||||
"upvotes": 12,
|
||||
"saves": 6,
|
||||
"comments": 1,
|
||||
"created_at": "2026-01-26",
|
||||
"updated_at": "2026-02-07",
|
||||
"url": "https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4"
|
||||
},
|
||||
{
|
||||
"title": "思维导图",
|
||||
"slug": "智能生成交互式思维导图帮助用户可视化知识_8d4b097b",
|
||||
@@ -229,7 +229,7 @@
|
||||
"author": "Fu-Jie",
|
||||
"description": "智能分析文本内容,生成交互式思维导图,帮助用户结构化和可视化知识。",
|
||||
"downloads": 37,
|
||||
"views": 564,
|
||||
"views": 565,
|
||||
"upvotes": 6,
|
||||
"saves": 2,
|
||||
"comments": 0,
|
||||
@@ -244,8 +244,8 @@
|
||||
"version": "1.2.2",
|
||||
"author": "Fu-Jie",
|
||||
"description": "通过智能摘要和消息压缩,降低长对话的 token 消耗,同时保持对话连贯性。",
|
||||
"downloads": 31,
|
||||
"views": 628,
|
||||
"downloads": 32,
|
||||
"views": 632,
|
||||
"upvotes": 7,
|
||||
"saves": 4,
|
||||
"comments": 0,
|
||||
@@ -261,7 +261,7 @@
|
||||
"author": "Fu-Jie",
|
||||
"description": "快速将文本提炼为精美的学习记忆卡片,支持核心要点提取与分类。",
|
||||
"downloads": 27,
|
||||
"views": 661,
|
||||
"views": 666,
|
||||
"upvotes": 8,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
@@ -276,8 +276,8 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "全方位的思维透镜 —— 从背景全景到逻辑脉络,从深度洞察到行动路径。",
|
||||
"downloads": 17,
|
||||
"views": 400,
|
||||
"downloads": 19,
|
||||
"views": 407,
|
||||
"upvotes": 5,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
@@ -293,7 +293,7 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 1429,
|
||||
"views": 1434,
|
||||
"upvotes": 12,
|
||||
"saves": 17,
|
||||
"comments": 8,
|
||||
@@ -309,7 +309,7 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 135,
|
||||
"views": 136,
|
||||
"upvotes": 2,
|
||||
"saves": 0,
|
||||
"comments": 0,
|
||||
@@ -325,9 +325,9 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 1392,
|
||||
"views": 1398,
|
||||
"upvotes": 14,
|
||||
"saves": 9,
|
||||
"saves": 10,
|
||||
"comments": 2,
|
||||
"created_at": "2026-01-10",
|
||||
"updated_at": "2026-01-10",
|
||||
@@ -339,11 +339,11 @@
|
||||
"name": "Fu-Jie",
|
||||
"profile_url": "https://openwebui.com/u/Fu-Jie",
|
||||
"profile_image": "https://community.s3.openwebui.com/uploads/users/b15d1348-4347-42b4-b815-e053342d6cb0/profile_d9510745-4bd4-4f8f-a997-4a21847d9300.webp",
|
||||
"followers": 204,
|
||||
"followers": 205,
|
||||
"following": 4,
|
||||
"total_points": 257,
|
||||
"post_points": 218,
|
||||
"total_points": 258,
|
||||
"post_points": 219,
|
||||
"comment_points": 39,
|
||||
"contributions": 41
|
||||
"contributions": 42
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
# 📊 OpenWebUI Community Stats Report
|
||||
|
||||
> 📅 Updated: 2026-02-07 17:12
|
||||
> 📅 Updated: 2026-02-08 07:12
|
||||
|
||||
## 📈 Overview
|
||||
|
||||
| Metric | Value |
|
||||
|------|------|
|
||||
| 📝 Total Posts | 20 |
|
||||
| ⬇️ Total Downloads | 3711 |
|
||||
| 👁️ Total Views | 43662 |
|
||||
| 👍 Total Upvotes | 220 |
|
||||
| 💾 Total Saves | 256 |
|
||||
| 💬 Total Comments | 47 |
|
||||
| ⬇️ Total Downloads | 3779 |
|
||||
| 👁️ Total Views | 44354 |
|
||||
| 👍 Total Upvotes | 221 |
|
||||
| 💾 Total Saves | 258 |
|
||||
| 💬 Total Comments | 49 |
|
||||
|
||||
## 📂 By Type
|
||||
|
||||
- **pipe**: 1
|
||||
- **action**: 14
|
||||
- **pipe**: 1
|
||||
- **unknown**: 4
|
||||
- **filter**: 1
|
||||
|
||||
@@ -24,23 +24,23 @@
|
||||
|
||||
| Rank | Title | Type | Version | Downloads | Views | Upvotes | Saves | Updated |
|
||||
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.2 | 883 | 7810 | 22 | 48 | 2026-01-28 |
|
||||
| 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.5.0 | 635 | 5880 | 24 | 33 | 2026-01-30 |
|
||||
| 3 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.3 | 347 | 2686 | 14 | 26 | 2026-01-28 |
|
||||
| 4 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.2 | 330 | 3436 | 14 | 33 | 2026-01-28 |
|
||||
| 5 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 327 | 1520 | 7 | 6 | 2026-01-29 |
|
||||
| 6 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 294 | 4270 | 17 | 27 | 2026-01-29 |
|
||||
| 7 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 213 | 3247 | 13 | 14 | 2026-01-28 |
|
||||
| 8 | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | unknown | | 153 | 2234 | 8 | 3 | 2026-01-28 |
|
||||
| 9 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 134 | 1162 | 6 | 11 | 2026-01-08 |
|
||||
| 10 | [导出为 Word (增强版)](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.3 | 119 | 2111 | 13 | 6 | 2026-01-28 |
|
||||
| 11 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.5.0 | 56 | 1006 | 10 | 1 | 2026-01-29 |
|
||||
| 12 | [📂 Folder Memory – Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter | 0.1.0 | 56 | 1209 | 6 | 8 | 2026-01-20 |
|
||||
| 13 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe | 0.3.0 | 52 | 1882 | 12 | 6 | 2026-02-07 |
|
||||
| 14 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.2 | 37 | 564 | 6 | 2 | 2026-01-28 |
|
||||
| 15 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.2 | 31 | 628 | 7 | 4 | 2026-01-28 |
|
||||
| 16 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 27 | 661 | 8 | 1 | 2026-01-28 |
|
||||
| 17 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 17 | 400 | 5 | 1 | 2026-01-08 |
|
||||
| 18 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | unknown | | 0 | 1429 | 12 | 17 | 2026-01-28 |
|
||||
| 19 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 135 | 2 | 0 | 2026-01-14 |
|
||||
| 20 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1392 | 14 | 9 | 2026-01-10 |
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.2 | 890 | 7901 | 22 | 49 | 2026-01-28 |
|
||||
| 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.5.0 | 645 | 6010 | 24 | 33 | 2026-01-30 |
|
||||
| 3 | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.4 | 358 | 2766 | 14 | 26 | 2026-02-07 |
|
||||
| 4 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.2 | 336 | 3485 | 14 | 33 | 2026-01-28 |
|
||||
| 5 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 330 | 1541 | 7 | 6 | 2026-01-29 |
|
||||
| 6 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 298 | 4320 | 17 | 27 | 2026-01-29 |
|
||||
| 7 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 214 | 3265 | 13 | 14 | 2026-01-28 |
|
||||
| 8 | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | unknown | | 157 | 2317 | 8 | 3 | 2026-01-28 |
|
||||
| 9 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 137 | 1176 | 6 | 11 | 2026-01-08 |
|
||||
| 10 | [导出为Word增强版](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.4 | 119 | 2126 | 13 | 6 | 2026-02-07 |
|
||||
| 11 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe | 0.3.0 | 65 | 1963 | 13 | 6 | 2026-02-07 |
|
||||
| 12 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.5.0 | 58 | 1017 | 10 | 1 | 2026-01-29 |
|
||||
| 13 | [📂 Folder Memory – Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter | 0.1.0 | 57 | 1229 | 6 | 8 | 2026-01-20 |
|
||||
| 14 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.2 | 37 | 565 | 6 | 2 | 2026-01-28 |
|
||||
| 15 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.2 | 32 | 632 | 7 | 4 | 2026-01-28 |
|
||||
| 16 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 27 | 666 | 8 | 1 | 2026-01-28 |
|
||||
| 17 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 19 | 407 | 5 | 1 | 2026-01-08 |
|
||||
| 18 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | unknown | | 0 | 1434 | 12 | 17 | 2026-01-28 |
|
||||
| 19 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 136 | 2 | 0 | 2026-01-14 |
|
||||
| 20 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1398 | 14 | 10 | 2026-01-10 |
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# 📊 OpenWebUI 社区统计报告
|
||||
|
||||
> 📅 更新时间: 2026-02-07 17:12
|
||||
> 📅 更新时间: 2026-02-08 07:12
|
||||
|
||||
## 📈 总览
|
||||
|
||||
| 指标 | 数值 |
|
||||
|------|------|
|
||||
| 📝 发布数量 | 20 |
|
||||
| ⬇️ 总下载量 | 3711 |
|
||||
| 👁️ 总浏览量 | 43662 |
|
||||
| 👍 总点赞数 | 220 |
|
||||
| 💾 总收藏数 | 256 |
|
||||
| 💬 总评论数 | 47 |
|
||||
| ⬇️ 总下载量 | 3779 |
|
||||
| 👁️ 总浏览量 | 44354 |
|
||||
| 👍 总点赞数 | 221 |
|
||||
| 💾 总收藏数 | 258 |
|
||||
| 💬 总评论数 | 49 |
|
||||
|
||||
## 📂 按类型分类
|
||||
|
||||
- **pipe**: 1
|
||||
- **action**: 14
|
||||
- **pipe**: 1
|
||||
- **unknown**: 4
|
||||
- **filter**: 1
|
||||
|
||||
@@ -24,23 +24,23 @@
|
||||
|
||||
| 排名 | 标题 | 类型 | 版本 | 下载 | 浏览 | 点赞 | 收藏 | 更新日期 |
|
||||
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.2 | 883 | 7810 | 22 | 48 | 2026-01-28 |
|
||||
| 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.5.0 | 635 | 5880 | 24 | 33 | 2026-01-30 |
|
||||
| 3 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.3 | 347 | 2686 | 14 | 26 | 2026-01-28 |
|
||||
| 4 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.2 | 330 | 3436 | 14 | 33 | 2026-01-28 |
|
||||
| 5 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 327 | 1520 | 7 | 6 | 2026-01-29 |
|
||||
| 6 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 294 | 4270 | 17 | 27 | 2026-01-29 |
|
||||
| 7 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 213 | 3247 | 13 | 14 | 2026-01-28 |
|
||||
| 8 | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | unknown | | 153 | 2234 | 8 | 3 | 2026-01-28 |
|
||||
| 9 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 134 | 1162 | 6 | 11 | 2026-01-08 |
|
||||
| 10 | [导出为 Word (增强版)](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.3 | 119 | 2111 | 13 | 6 | 2026-01-28 |
|
||||
| 11 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.5.0 | 56 | 1006 | 10 | 1 | 2026-01-29 |
|
||||
| 12 | [📂 Folder Memory – Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter | 0.1.0 | 56 | 1209 | 6 | 8 | 2026-01-20 |
|
||||
| 13 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe | 0.3.0 | 52 | 1882 | 12 | 6 | 2026-02-07 |
|
||||
| 14 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.2 | 37 | 564 | 6 | 2 | 2026-01-28 |
|
||||
| 15 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.2 | 31 | 628 | 7 | 4 | 2026-01-28 |
|
||||
| 16 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 27 | 661 | 8 | 1 | 2026-01-28 |
|
||||
| 17 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 17 | 400 | 5 | 1 | 2026-01-08 |
|
||||
| 18 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | unknown | | 0 | 1429 | 12 | 17 | 2026-01-28 |
|
||||
| 19 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 135 | 2 | 0 | 2026-01-14 |
|
||||
| 20 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1392 | 14 | 9 | 2026-01-10 |
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.2 | 890 | 7901 | 22 | 49 | 2026-01-28 |
|
||||
| 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.5.0 | 645 | 6010 | 24 | 33 | 2026-01-30 |
|
||||
| 3 | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.4 | 358 | 2766 | 14 | 26 | 2026-02-07 |
|
||||
| 4 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.2 | 336 | 3485 | 14 | 33 | 2026-01-28 |
|
||||
| 5 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 330 | 1541 | 7 | 6 | 2026-01-29 |
|
||||
| 6 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 298 | 4320 | 17 | 27 | 2026-01-29 |
|
||||
| 7 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 214 | 3265 | 13 | 14 | 2026-01-28 |
|
||||
| 8 | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | unknown | | 157 | 2317 | 8 | 3 | 2026-01-28 |
|
||||
| 9 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 137 | 1176 | 6 | 11 | 2026-01-08 |
|
||||
| 10 | [导出为Word增强版](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.4 | 119 | 2126 | 13 | 6 | 2026-02-07 |
|
||||
| 11 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe | 0.3.0 | 65 | 1963 | 13 | 6 | 2026-02-07 |
|
||||
| 12 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.5.0 | 58 | 1017 | 10 | 1 | 2026-01-29 |
|
||||
| 13 | [📂 Folder Memory – Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter | 0.1.0 | 57 | 1229 | 6 | 8 | 2026-01-20 |
|
||||
| 14 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.2 | 37 | 565 | 6 | 2 | 2026-01-28 |
|
||||
| 15 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.2 | 32 | 632 | 7 | 4 | 2026-01-28 |
|
||||
| 16 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 27 | 666 | 8 | 1 | 2026-01-28 |
|
||||
| 17 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 19 | 407 | 5 | 1 | 2026-01-08 |
|
||||
| 18 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | unknown | | 0 | 1434 | 12 | 17 | 2026-01-28 |
|
||||
| 19 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 136 | 2 | 0 | 2026-01-14 |
|
||||
| 20 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1398 | 14 | 10 | 2026-01-10 |
|
||||
|
||||
@@ -1,32 +1,36 @@
|
||||
# GitHub Copilot SDK Pipe for OpenWebUI
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.3.0 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.5.1 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
|
||||
|
||||
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that allows you to use GitHub Copilot models (such as `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`) directly within OpenWebUI. It is built upon the official [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk), providing a native integration experience.
|
||||
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that integrates the official [GitHub Copilot SDK](https://github.com/github/copilot-sdk). It enables you to use **GitHub Copilot models** (e.g., `gpt-5.2-codex`, `claude-sonnet-4.5`, `gemini-3-pro`, `gpt-5-mini`) **AND** your own models via **BYOK** (OpenAI, Anthropic) directly within OpenWebUI, providing a unified agentic experience.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **Active GitHub Copilot Subscription Required**
|
||||
> This plugin requires a valid GitHub Copilot subscription (Individual, Business, or Enterprise). It will verify your subscription status during authentication.
|
||||
> [!TIP]
|
||||
> **No Subscription Required for BYOK**
|
||||
> If you are using your own API keys (BYOK mode with OpenAI/Anthropic), **you do NOT need a GitHub Copilot subscription.**
|
||||
> A subscription is only required to access GitHub's official models.
|
||||
|
||||
## 🚀 What's New (v0.3.0) - The Power of "Unified Ecosystem"
|
||||
## 🚀 What's New (v0.5.1) - Major Upgrade
|
||||
|
||||
* **🔌 Zero-Config Tool Bridge**: Automatically transforms your existing OpenWebUI Functions (Tools) into Copilot-compatible tools. **Copilot now has total access to your entire WebUI toolset!**
|
||||
* **🔗 Dynamic MCP Discovery**: Seamlessly connects to MCP servers defined in **Admin Settings -> Connections**. No configuration files required—it just works.
|
||||
* **⚡ High-Performance Async Engine**: Background CLI updates and optimized event-driven streaming ensure lightning-fast responses without UI lag.
|
||||
* **🛡️ Robust Interoperability**: Advanced sanitization and dynamic Pydantic model generation ensure smooth integration even with complex third-party tools.
|
||||
- **🧠 Smarter BYOK Detection**: Improved logic to correctly identify BYOK vs. Official Copilot models, supporting custom models (Characters/Prompts) and fixing multiplier detection (e.g., `(0x)`, `(1x)`).
|
||||
- **⚡ Performance Boost**: Implemented **Tool Caching** to persist tool definitions across requests, significantly reducing overhead.
|
||||
- **🧩 Enriched Tool Integration**: Tool descriptions now include source grouping (Built-in/User/Server) and automatic metadata extraction (Title/Description) from Python docstrings.
|
||||
- **🛡️ Precise Control**: Added support for OpenWebUI's `function_name_filter_list` to filter MCP and OpenAPI functions.
|
||||
- **🔑 User-Level BYOK**: Fully leverage Copilot SDK with your own Model Providers (OpenAI, Anthropic) with user-level API Key overrides.
|
||||
- **📝 Better Formatting**: Enforced standard Markdown tables in system prompts to prevent rendering issues with HTML tables.
|
||||
|
||||
## ✨ Key Capabilities
|
||||
|
||||
* **🌉 The Ultimate Bridge**: The first and only plugin that creates a seamless bridge between **OpenWebUI Tools** and **GitHub Copilot SDK**.
|
||||
* **🚀 Official & Native**: Built directly on the official Python SDK, providing the most stable and authentic Copilot experience.
|
||||
* **🌊 Advanced Streaming (Thought Process)**: Supports full model reasoning/thinking display with typewriter effects.
|
||||
* **🖼️ Intelligent Multimodal**: Full support for images and attachments, enabling Copilot to "see" your workspace.
|
||||
* **🛠️ Effortless Setup**: Automatic CLI detection, version enforcement, and dependency management.
|
||||
* **🔑 Dual-Layer Security**: Supports secure OAuth flow for Chat and standard PAT for extended MCP capabilities.
|
||||
- **🔑 Flexible Auth & BYOK**: Supports GitHub Copilot subscription (PAT) OR Bring Your Own Key (OpenAI/Anthropic), giving you total control over model access and billing.
|
||||
- **🌉 The Ultimate Bridge**: The first and only plugin that creates a seamless bridge between **OpenWebUI Tools** and **GitHub Copilot SDK**.
|
||||
- **🚀 Official & Native**: Built directly on the official Python SDK, providing the most stable and authentic Copilot experience.
|
||||
- **🌊 Advanced Streaming (Thought Process)**: Supports full model reasoning/thinking display with typewriter effects.
|
||||
- **🖼️ Intelligent Multimodal**: Full support for images and attachments, enabling Copilot to "see" your workspace.
|
||||
- **🛠️ Effortless Setup**: Automatic CLI detection, version enforcement, and dependency management.
|
||||
- **🛡️ Integrated Security**: Supports secure PAT authentication for standard and extended capabilities.
|
||||
|
||||
## 📦 Installation & Usage
|
||||
## Installation & Configuration
|
||||
|
||||
### 1. Import Function
|
||||
### 1) Import Function
|
||||
|
||||
1. Open OpenWebUI.
|
||||
2. Go to **Workspace** -> **Functions**.
|
||||
@@ -34,7 +38,7 @@ This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/
|
||||
4. Paste the content of `github_copilot_sdk.py` (or `github_copilot_sdk_cn.py` for Chinese) completely.
|
||||
5. Save.
|
||||
|
||||
### 2. Configure Valves (Settings)
|
||||
### 2) Configure Valves (Settings)
|
||||
|
||||
Find "GitHub Copilot" in the function list and click the **⚙️ (Valves)** icon to configure:
|
||||
|
||||
@@ -53,9 +57,14 @@ Find "GitHub Copilot" in the function list and click the **⚙️ (Valves)** ico
|
||||
| **TIMEOUT** | Timeout for each stream chunk (seconds). | `300` |
|
||||
| **CUSTOM_ENV_VARS** | Custom environment variables (JSON format). | - |
|
||||
| **REASONING_EFFORT** | Reasoning effort level: low, medium, high. `xhigh` is supported for some models. | `medium` |
|
||||
| **ENFORCE_FORMATTING** | Add formatting instructions to system prompt for better readability. | `True` |
|
||||
| **ENABLE_MCP_SERVER** | Enable Direct MCP Client connection (Recommended). | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | Enable OpenWebUI Tools (includes defined and server tools). | `True` |
|
||||
| **BYOK_ENABLED** | Enable BYOK (Bring Your Own Key) to use custom providers. | `False` |
|
||||
| **BYOK_TYPE** | BYOK Provider Type: `openai`, `azure`, `anthropic`. | `openai` |
|
||||
| **BYOK_BASE_URL** | BYOK Base URL (e.g., `https://api.openai.com/v1`). | - |
|
||||
| **BYOK_API_KEY** | BYOK API Key (Global Setting). | - |
|
||||
| **BYOK_BEARER_TOKEN** | BYOK Bearer Token (Global, overrides API Key). | - |
|
||||
| **BYOK_WIRE_API** | BYOK Wire API: `completions`, `responses`. | `completions` |
|
||||
|
||||
#### User Valves (per-user overrides)
|
||||
|
||||
@@ -69,9 +78,13 @@ These optional settings can be set per user (overrides global Valves):
|
||||
| **SHOW_THINKING** | Show model reasoning/thinking process. | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | Enable OpenWebUI Tools (overrides global). | `True` |
|
||||
| **ENABLE_MCP_SERVER** | Enable MCP server loading (overrides global). | `True` |
|
||||
| **ENFORCE_FORMATTING** | Enforce formatting guidelines (overrides global). | `True` |
|
||||
| **BYOK_API_KEY** | BYOK API Key (User override). | - |
|
||||
|
||||
### 3. Get Token
|
||||
## ⭐ Support
|
||||
|
||||
If this plugin has been useful, a star on [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) is a big motivation for me. Thank you for the support.
|
||||
|
||||
### Get Token
|
||||
|
||||
To use GitHub Copilot, you need a GitHub Personal Access Token (PAT) with appropriate permissions.
|
||||
|
||||
@@ -81,24 +94,24 @@ To use GitHub Copilot, you need a GitHub Personal Access Token (PAT) with approp
|
||||
2. Click **Generate new token (fine-grained)**.
|
||||
3. **Repository access**: Select **Public Repositories** (simplest) or **All repositories**.
|
||||
4. **Permissions**:
|
||||
* If you chose **All repositories**, you must click **Account permissions**.
|
||||
* Find **Copilot Requests**, and select **Access**.
|
||||
- If you chose **All repositories**, you must click **Account permissions**.
|
||||
- Find **Copilot Requests**, and select **Access**.
|
||||
5. Generate and copy the Token.
|
||||
|
||||
## 📋 Dependencies
|
||||
|
||||
This Pipe will automatically attempt to install the following dependencies:
|
||||
|
||||
* `github-copilot-sdk` (Python package)
|
||||
* `github-copilot-cli` (Binary file, installed via official script)
|
||||
- `github-copilot-sdk` (Python package)
|
||||
- `github-copilot-cli` (Binary file, installed via official script)
|
||||
|
||||
## Troubleshooting ❓
|
||||
|
||||
* **Images and Multimodal Usage**:
|
||||
* Ensure `MODEL_ID` is a model that supports multimodal input.
|
||||
* **Thinking not shown**:
|
||||
* Ensure **streaming is enabled** and the selected model supports reasoning output.
|
||||
- **Images not recognized**:
|
||||
- Ensure `MODEL_ID` is a model that supports multimodal input.
|
||||
- **Thinking not shown**:
|
||||
- Ensure **streaming is enabled** and the selected model supports reasoning output.
|
||||
|
||||
## 📄 License
|
||||
## Changelog
|
||||
|
||||
MIT
|
||||
See the full history on GitHub: [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui)
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
# GitHub Copilot SDK 官方管道
|
||||
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.3.0 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.5.1 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
|
||||
|
||||
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,允许你直接在 OpenWebUI 中使用 GitHub Copilot 模型(如 `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`)。它基于官方 [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk) 构建,提供了原生级的集成体验。
|
||||
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,深度集成了 **GitHub Copilot SDK**。它不仅支持 **GitHub Copilot 官方模型**(如 `gpt-5.2-codex`, `claude-sonnet-4.5`, `gemini-3-pro`, `gpt-5-mini`),还支持 **BYOK (自带 Key)** 模式对接自定义服务商(OpenAI, Anthropic),提供统一的 Agent 交互体验。
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **需 GitHub Copilot 订阅**
|
||||
> 本插件需要有效的 GitHub Copilot 订阅(个人版、商业版或企业版)。插件将在认证阶段验证您的订阅状态。
|
||||
> [!TIP]
|
||||
> **使用 BYOK 模式无需订阅**
|
||||
> 如果您使用自己的 API Key (OpenAI, Anthropic) 运行 BYOK 模式,**则完全不需要** GitHub Copilot 订阅。
|
||||
> 仅当您希望使用 GitHub 官方提供的模型时,才需要订阅。
|
||||
|
||||
## 🚀 最新特性 (v0.3.0) - “统一生态”的力量
|
||||
## 🚀 最新特性 (v0.5.1) - 重大升级
|
||||
|
||||
* **🔌 零配置工具桥接 (Unified Tool Bridge)**: 自动将您现有的 OpenWebUI Functions (工具) 转换为 Copilot 兼容工具。**Copilot 现在可以无缝调用您手头所有的 WebUI 工具!**
|
||||
* **🔗 动态 MCP 自动发现**: 直接联动 OpenWebUI **管理面板 -> 连接**。无需编写任何配置文件,即插即用,瞬间扩展 Copilot 能力边界。
|
||||
* **⚡ 高性能异步引擎**: 异步 CLI 更新检查与高度优化的事件驱动流式处理,确保对话毫秒级响应。
|
||||
* **🛡️ 卓越的兼容性**: 独创的动态 Pydantic 模型生成技术,确保复杂工具参数在 Copilot 端也能得到精准验证。
|
||||
- **🧠 智能 BYOK 检测**: 优化了 BYOK 与官方 Copilot 模型的识别逻辑,完美支持自定义模型(角色/提示词)及倍率检测(如 `(0x)`, `(1x)`)。
|
||||
- **⚡ 性能飙升**: 引入 **工具缓存 (Tool Caching)** 机制,在请求间持久化工具定义,显著降低调用开销。
|
||||
- **🧩 丰富工具集成**: 工具描述现包含来源分组(内置/用户/服务器)及 Docstring 元数据自动解析。
|
||||
- **🛡️ 精确控制**: 完美兼容 OpenWebUI 全局函数过滤配置 (`function_name_filter_list`),可精准控制暴露给 LLM 的函数。
|
||||
- **🔑 用户级 BYOK**: 支持在用户层面配置自定义 API Key 对接 AI 供应商(OpenAI, Anthropic)。
|
||||
- **📝 格式优化**: 系统提示词强制使用标准 Markdown 表格,彻底解决 HTML 表格渲染问题。
|
||||
|
||||
## ✨ 核心能力
|
||||
|
||||
* **🌉 强大的生态桥接**: 首个且唯一完美打通 **OpenWebUI Tools** 与 **GitHub Copilot SDK** 的插件。
|
||||
* **🚀 官方原生产体验**: 基于官方 Python SDK 构建,提供最稳定、最纯正的 Copilot 交互体验。
|
||||
* **🌊 深度推理展示**: 完整支持模型思考过程 (Thinking Process) 的流式渲染。
|
||||
* **🖼️ 智能多模态**: 支持图像识别与附件上传,让 Copilot 拥有视觉能力。
|
||||
* **🛠️ 极简部署流程**: 自动检测环境、自动下载 CLI、自动管理依赖,全自动化开箱即用。
|
||||
* **🔑 安全认证体系**: 完美支持 OAuth 授权与 PAT 模式,兼顾便捷与安全性。
|
||||
- **🔑 灵活鉴权与 BYOK**: 支持 GitHub Copilot 订阅 (PAT) 或自带 Key (OpenAI/Anthropic),完全掌控模型访问与计费。
|
||||
- **🌉 强大的生态桥接**: 首个且唯一完美打通 **OpenWebUI Tools** 与 **GitHub Copilot SDK** 的插件。
|
||||
- **🚀 官方原生产体验**: 基于官方 Python SDK 构建,提供最稳定、最纯正的 Copilot 交互体验。
|
||||
- **🌊 深度推理展示**: 完整支持模型思考过程 (Thinking Process) 的流式渲染。
|
||||
- **🖼️ 智能多模态**: 支持图像识别与附件上传,让 Copilot 拥有视觉能力。
|
||||
- **🛠️ 极简部署流程**: 自动检测环境、自动下载 CLI、自动管理依赖,全自动化开箱即用。
|
||||
- **🛡️ 纯净安全体系**: 支持标准 PAT 认证,确保数据安全。
|
||||
|
||||
## 📦 安装与使用
|
||||
## 安装与配置
|
||||
|
||||
### 1. 导入函数
|
||||
|
||||
@@ -53,9 +58,14 @@
|
||||
| **TIMEOUT** | 每个流式分块超时(秒)。 | `300` |
|
||||
| **CUSTOM_ENV_VARS** | 自定义环境变量 (JSON 格式)。 | - |
|
||||
| **REASONING_EFFORT** | 推理强度级别: low, medium, high. `xhigh` 仅部分模型支持。 | `medium` |
|
||||
| **ENFORCE_FORMATTING** | 在系统提示词中添加格式化指导。 | `True` |
|
||||
| **ENABLE_MCP_SERVER** | 启用直接 MCP 客户端连接 (建议)。 | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | 启用 OpenWebUI 工具 (包括自定义和服务器工具)。 | `True` |
|
||||
| **BYOK_ENABLED** | 启用 BYOK (自带 Key) 模式以使用自定义供应商。 | `False` |
|
||||
| **BYOK_TYPE** | BYOK 供应商类型: `openai`, `azure`, `anthropic`。 | `openai` |
|
||||
| **BYOK_BASE_URL** | BYOK 基础 URL (如 `https://api.openai.com/v1`)。 | - |
|
||||
| **BYOK_API_KEY** | BYOK API Key (全局设置)。 | - |
|
||||
| **BYOK_BEARER_TOKEN** | BYOK Bearer Token (全局,覆盖 API Key)。 | - |
|
||||
| **BYOK_WIRE_API** | BYOK 通信协议: `completions`, `responses`。 | `completions` |
|
||||
|
||||
#### 用户 Valves(按用户覆盖)
|
||||
|
||||
@@ -69,9 +79,12 @@
|
||||
| **SHOW_THINKING** | 是否显示思考过程。 | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | 启用 OpenWebUI 工具(覆盖全局设置)。 | `True` |
|
||||
| **ENABLE_MCP_SERVER** | 启用动态 MCP 服务器加载(覆盖全局设置)。 | `True` |
|
||||
| **ENFORCE_FORMATTING** | 强制启用格式化指导(覆盖全局设置)。 | `True` |
|
||||
|
||||
### 3. 获取 Token
|
||||
## ⭐ 支持
|
||||
|
||||
如果这个插件对你有帮助,欢迎到 [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) 点个 Star,这将是我持续改进的动力,感谢支持。
|
||||
|
||||
### 获取 Token
|
||||
|
||||
要使用 GitHub Copilot,您需要一个具有适当权限的 GitHub 个人访问令牌 (PAT)。
|
||||
|
||||
@@ -81,24 +94,24 @@
|
||||
2. 点击 **Generate new token (fine-grained)**。
|
||||
3. **Repository access**: 选择 **Public Repositories** (最简单) 或 **All repositories**。
|
||||
4. **Permissions**:
|
||||
* 如果您选择了 **All repositories**,则必须点击 **Account permissions**。
|
||||
* 找到 **Copilot Requests**,选择 **Access**。
|
||||
- 如果您选择了 **All repositories**,则必须点击 **Account permissions**。
|
||||
- 找到 **Copilot Requests**,选择 **Access**。
|
||||
5. 生成并复制令牌。
|
||||
|
||||
## 📋 依赖说明
|
||||
|
||||
该 Pipe 会自动尝试安装以下依赖(如果环境中缺失):
|
||||
|
||||
* `github-copilot-sdk` (Python 包)
|
||||
* `github-copilot-cli` (二进制文件,通过官方脚本安装)
|
||||
- `github-copilot-sdk` (Python 包)
|
||||
- `github-copilot-cli` (二进制文件,通过官方脚本安装)
|
||||
|
||||
## 故障排除 (Troubleshooting) ❓
|
||||
|
||||
* **图片及多模态使用说明**:
|
||||
* 确保 `MODEL_ID` 是支持多模态的模型。
|
||||
* **看不到思考过程**:
|
||||
* 确认已开启**流式输出**,且所选模型支持推理输出。
|
||||
- **图片及多模态使用说明**:
|
||||
- 确保 `MODEL_ID` 是支持多模态的模型。
|
||||
- **看不到思考过程**:
|
||||
- 确认已开启**流式输出**,且所选模型支持推理输出。
|
||||
|
||||
## 📄 许可证
|
||||
## 更新日志
|
||||
|
||||
MIT
|
||||
完整历史请查看 GitHub 项目: [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui)
|
||||
|
||||
@@ -15,7 +15,7 @@ Pipes allow you to:
|
||||
|
||||
## Available Pipe Plugins
|
||||
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.3.0) - Official GitHub Copilot SDK integration. Features **zero-config OpenWebUI Tool Bridge** and **dynamic MCP discovery**. Supports streaming, multimodal, and infinite sessions.
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.5.1) - Official GitHub Copilot SDK integration. Features **zero-config OpenWebUI Tool Bridge**, **BYOK** support, and **dynamic MCP discovery**. Supports streaming, multimodal, and infinite sessions.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Pipes 可以用于:
|
||||
|
||||
## 可用的 Pipe 插件
|
||||
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.3.0) - GitHub Copilot SDK 官方集成。**零配置工具桥接**与**动态 MCP 发现**。支持流式输出、多模态及无限会话。
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.5.1) - GitHub Copilot SDK 官方集成。**零配置工具桥接**与**BYOK (自带 Key) 支持**。支持流式输出、多模态及无限会话。
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,28 +1,32 @@
|
||||
# GitHub Copilot SDK Pipe for OpenWebUI
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.3.0 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.5.1 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
|
||||
|
||||
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that allows you to use GitHub Copilot models (such as `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`) directly within OpenWebUI. It is built upon the official [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk), providing a native integration experience.
|
||||
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that integrates the official [GitHub Copilot SDK](https://github.com/github/copilot-sdk). It enables you to use **GitHub Copilot models** (e.g., `gpt-5.2-codex`, `claude-sonnet-4.5`,`gemini-3-pro`, `gpt-5-mini`) **AND** your own models via **BYOK** (OpenAI, Anthropic) directly within OpenWebUI, providing a unified agentic experience.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **Active GitHub Copilot Subscription Required**
|
||||
> This plugin requires a valid GitHub Copilot subscription (Individual, Business, or Enterprise). It will verify your subscription status during authentication.
|
||||
> [!TIP]
|
||||
> **No Subscription Required for BYOK**
|
||||
> If you are using your own API keys (BYOK mode with OpenAI/Anthropic), **you do NOT need a GitHub Copilot subscription.**
|
||||
> A subscription is only required to access GitHub's official models.
|
||||
|
||||
## 🚀 What's New (v0.3.0) - The Power of "Unified Ecosystem"
|
||||
## 🚀 What's New (v0.5.1) - Major Upgrade
|
||||
|
||||
* **🔌 Zero-Config Tool Bridge**: Automatically transforms your existing OpenWebUI Functions (Tools) into Copilot-compatible tools. **Copilot now has total access to your entire WebUI toolset!**
|
||||
* **🔗 Dynamic MCP Discovery**: Seamlessly connects to MCP servers defined in **Admin Settings -> Connections**. No configuration files required—it just works.
|
||||
* **⚡ High-Performance Async Engine**: Background CLI updates and optimized event-driven streaming ensure lightning-fast responses without UI lag.
|
||||
* **🛡️ Robust Interoperability**: Advanced sanitization and dynamic Pydantic model generation ensure smooth integration even with complex third-party tools.
|
||||
- **🧠 Smarter BYOK Detection**: Improved logic to correctly identify BYOK vs. Official Copilot models, supporting custom models (Characters/Prompts) and fixing multiplier detection (e.g., `(0x)`, `(1x)`).
|
||||
- **⚡ Performance Boost**: Implemented **Tool Caching** to persist tool definitions across requests, significantly reducing overhead.
|
||||
- **🧩 Enriched Tool Integration**: Tool descriptions now include source grouping (Built-in/User/Server) and automatic metadata extraction (Title/Description) from Python docstrings.
|
||||
- **🛡️ Precise Control**: Added support for OpenWebUI's `function_name_filter_list` to filter MCP and OpenAPI functions.
|
||||
- **🔑 User-Level BYOK**: Fully leverage Copilot SDK with your own Model Providers (OpenAI, Anthropic) with user-level API Key overrides.
|
||||
- **📝 Better Formatting**: Enforced standard Markdown tables in system prompts to prevent rendering issues with HTML tables.
|
||||
|
||||
## ✨ Key Capabilities
|
||||
|
||||
* **🌉 The Ultimate Bridge**: The first and only plugin that creates a seamless bridge between **OpenWebUI Tools** and **GitHub Copilot SDK**.
|
||||
* **🚀 Official & Native**: Built directly on the official Python SDK, providing the most stable and authentic Copilot experience.
|
||||
* **🌊 Advanced Streaming (Thought Process)**: Supports full model reasoning/thinking display with typewriter effects.
|
||||
* **🖼️ Intelligent Multimodal**: Full support for images and attachments, enabling Copilot to "see" your workspace.
|
||||
* **🛠️ Effortless Setup**: Automatic CLI detection, version enforcement, and dependency management.
|
||||
* **🔑 Dual-Layer Security**: Supports secure OAuth flow for Chat and standard PAT for extended MCP capabilities.
|
||||
- **🔑 Flexible Auth & BYOK**: Supports GitHub Copilot subscription (PAT) OR Bring Your Own Key (OpenAI/Anthropic), giving you total control over model access and billing.
|
||||
- **🌉 The Ultimate Bridge**: The first and only plugin that creates a seamless bridge between **OpenWebUI Tools** and **GitHub Copilot SDK**.
|
||||
- **🚀 Official & Native**: Built directly on the official Python SDK, providing the most stable and authentic Copilot experience.
|
||||
- **🌊 Advanced Streaming (Thought Process)**: Supports full model reasoning/thinking display with typewriter effects.
|
||||
- **🖼️ Intelligent Multimodal**: Full support for images and attachments, enabling Copilot to "see" your workspace.
|
||||
- **🛠️ Effortless Setup**: Automatic CLI detection, version enforcement, and dependency management.
|
||||
- **🛡️ Integrated Security**: Supports secure PAT authentication for standard and extended capabilities.
|
||||
|
||||
## Installation & Configuration
|
||||
|
||||
@@ -53,9 +57,15 @@ Find "GitHub Copilot" in the function list and click the **⚙️ (Valves)** ico
|
||||
| **TIMEOUT** | Timeout for each stream chunk (seconds). | `300` |
|
||||
| **CUSTOM_ENV_VARS** | Custom environment variables (JSON format). | - |
|
||||
| **REASONING_EFFORT** | Reasoning effort level: low, medium, high. `xhigh` is supported for some models. | `medium` |
|
||||
| **ENFORCE_FORMATTING** | Add formatting instructions to system prompt for better readability. | `True` |
|
||||
|
||||
| **ENABLE_MCP_SERVER** | Enable Direct MCP Client connection (Recommended). | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | Enable OpenWebUI Tools (includes defined and server tools). | `True` |
|
||||
| **BYOK_ENABLED** | Enable BYOK (Bring Your Own Key) to use custom providers. | `False` |
|
||||
| **BYOK_TYPE** | BYOK Provider Type: `openai`, `azure`, `anthropic`. | `openai` |
|
||||
| **BYOK_BASE_URL** | BYOK Base URL (e.g., `https://api.openai.com/v1`). | - |
|
||||
| **BYOK_API_KEY** | BYOK API Key (Global Setting). | - |
|
||||
| **BYOK_BEARER_TOKEN** | BYOK Bearer Token (Global, overrides API Key). | - |
|
||||
| **BYOK_WIRE_API** | BYOK Wire API: `completions`, `responses`. | `completions` |
|
||||
|
||||
#### User Valves (per-user overrides)
|
||||
|
||||
@@ -69,7 +79,8 @@ These optional settings can be set per user (overrides global Valves):
|
||||
| **SHOW_THINKING** | Show model reasoning/thinking process. | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | Enable OpenWebUI Tools (overrides global). | `True` |
|
||||
| **ENABLE_MCP_SERVER** | Enable MCP server loading (overrides global). | `True` |
|
||||
| **ENFORCE_FORMATTING** | Enforce formatting guidelines (overrides global). | `True` |
|
||||
|
||||
| **BYOK_API_KEY** | BYOK API Key (User override). | - |
|
||||
|
||||
## ⭐ Support
|
||||
|
||||
@@ -85,23 +96,23 @@ To use GitHub Copilot, you need a GitHub Personal Access Token (PAT) with approp
|
||||
2. Click **Generate new token (fine-grained)**.
|
||||
3. **Repository access**: Select **Public Repositories** (simplest) or **All repositories**.
|
||||
4. **Permissions**:
|
||||
* If you chose **All repositories**, you must click **Account permissions**.
|
||||
* Find **Copilot Requests**, and select **Access**.
|
||||
- If you chose **All repositories**, you must click **Account permissions**.
|
||||
- Find **Copilot Requests**, and select **Access**.
|
||||
5. Generate and copy the Token.
|
||||
|
||||
## 📋 Dependencies
|
||||
|
||||
This Pipe will automatically attempt to install the following dependencies:
|
||||
|
||||
* `github-copilot-sdk` (Python package)
|
||||
* `github-copilot-cli` (Binary file, installed via official script)
|
||||
- `github-copilot-sdk` (Python package)
|
||||
- `github-copilot-cli` (Binary file, installed via official script)
|
||||
|
||||
## Troubleshooting ❓
|
||||
|
||||
* **Images not recognized**:
|
||||
* Ensure `MODEL_ID` is a model that supports multimodal input.
|
||||
* **Thinking not shown**:
|
||||
* Ensure **streaming is enabled** and the selected model supports reasoning output.
|
||||
- **Images not recognized**:
|
||||
- Ensure `MODEL_ID` is a model that supports multimodal input.
|
||||
- **Thinking not shown**:
|
||||
- Ensure **streaming is enabled** and the selected model supports reasoning output.
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
@@ -1,28 +1,33 @@
|
||||
# GitHub Copilot SDK 官方管道
|
||||
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.3.0 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.5.1 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
|
||||
|
||||
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,允许你直接在 OpenWebUI 中使用 GitHub Copilot 模型(如 `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`)。它基于官方 [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk) 构建,提供了原生级的集成体验。
|
||||
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,深度集成了 **GitHub Copilot SDK**。它不仅支持 **GitHub Copilot 官方模型**(如 `gpt-5.2-codex`, `claude-sonnet-4.5`, `gemini-3-pro`, `gpt-5-mini`),还支持 **BYOK (自带 Key)** 模式对接自定义服务商(OpenAI, Anthropic),提供统一的 Agent 交互体验。
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **需 GitHub Copilot 订阅**
|
||||
> 本插件需要有效的 GitHub Copilot 订阅(个人版、商业版或企业版)。插件将在认证阶段验证您的订阅状态。
|
||||
> [!TIP]
|
||||
> **使用 BYOK 模式无需订阅**
|
||||
> 如果您使用自己的 API Key (OpenAI, Anthropic) 运行 BYOK 模式,**则完全不需要** GitHub Copilot 订阅。
|
||||
> 仅当您希望使用 GitHub 官方提供的模型时,才需要订阅。
|
||||
|
||||
## 🚀 最新特性 (v0.3.0) - “统一生态”的力量
|
||||
## 🚀 最新特性 (v0.5.1) - 重大升级
|
||||
|
||||
* **🔌 零配置工具桥接 (Unified Tool Bridge)**: 自动将您现有的 OpenWebUI Functions (工具) 转换为 Copilot 兼容工具。**Copilot 现在可以无缝调用您手头所有的 WebUI 工具!**
|
||||
* **🔗 动态 MCP 自动发现**: 直接联动 OpenWebUI **管理面板 -> 连接**。无需编写任何配置文件,即插即用,瞬间扩展 Copilot 能力边界。
|
||||
* **⚡ 高性能异步引擎**: 异步 CLI 更新检查与高度优化的事件驱动流式处理,确保对话毫秒级响应。
|
||||
* **🛡️ 卓越的兼容性**: 独创的动态 Pydantic 模型生成技术,确保复杂工具参数在 Copilot 端也能得到精准验证。
|
||||
- **🧠 智能 BYOK 检测**: 优化了 BYOK 与官方 Copilot 模型的识别逻辑,完美支持自定义模型(角色/提示词)及倍率检测(如 `(0x)`, `(1x)`)。
|
||||
- **⚡ 性能飙升**: 引入 **工具缓存 (Tool Caching)** 机制,在请求间持久化工具定义,显著降低调用开销。
|
||||
- **🧩 丰富工具集成**: 工具描述现包含来源分组(内置/用户/服务器)及 Docstring 元数据自动解析。
|
||||
- **🛡️ 精确控制**: 完美兼容 OpenWebUI 全局函数过滤配置 (`function_name_filter_list`),可精准控制暴露给 LLM 的函数。
|
||||
- **🔑 用户级 BYOK**: 支持在用户层面配置自定义 API Key 对接 AI 供应商(OpenAI, Anthropic)。
|
||||
- **📝 格式优化**: 系统提示词强制使用标准 Markdown 表格,彻底解决 HTML 表格渲染问题。
|
||||
|
||||
## ✨ 核心能力
|
||||
|
||||
* **🌉 强大的生态桥接**: 首个且唯一完美打通 **OpenWebUI Tools** 与 **GitHub Copilot SDK** 的插件。
|
||||
* **🚀 官方原生产体验**: 基于官方 Python SDK 构建,提供最稳定、最纯正的 Copilot 交互体验。
|
||||
* **🌊 深度推理展示**: 完整支持模型思考过程 (Thinking Process) 的流式渲染。
|
||||
* **🖼️ 智能多模态**: 支持图像识别与附件上传,让 Copilot 拥有视觉能力。
|
||||
* **🛠️ 极简部署流程**: 自动检测环境、自动下载 CLI、自动管理依赖,全自动化开箱即用。
|
||||
* **🔑 安全认证体系**: 完美支持 OAuth 授权与 PAT 模式,兼顾便捷与安全性。
|
||||
- **🔑 灵活鉴权与 BYOK**: 支持 GitHub Copilot 订阅 (PAT) 或自带 Key (OpenAI/Anthropic),完全掌控模型访问与计费。
|
||||
- **🌉 强大的生态桥接**: 首个且唯一完美打通 **OpenWebUI Tools** 与 **GitHub Copilot SDK** 的插件。
|
||||
- **🚀 官方原生产体验**: 基于官方 Python SDK 构建,提供最稳定、最纯正的 Copilot 交互体验。
|
||||
- **🌊 深度推理展示**: 完整支持模型思考过程 (Thinking Process) 的流式渲染。
|
||||
- **🖼️ 智能多模态**: 支持图像识别与附件上传,让 Copilot 拥有视觉能力。
|
||||
- **🛠️ 极简部署流程**: 自动检测环境、自动下载 CLI、自动管理依赖,全自动化开箱即用。
|
||||
- **🛡️ 纯净安全体系**: 支持标准 PAT 认证,确保数据安全。
|
||||
|
||||
## 安装与配置
|
||||
|
||||
@@ -53,9 +58,14 @@
|
||||
| **TIMEOUT** | 每个流式分块超时(秒)。 | `300` |
|
||||
| **CUSTOM_ENV_VARS** | 自定义环境变量 (JSON 格式)。 | - |
|
||||
| **REASONING_EFFORT** | 推理强度级别: low, medium, high. `xhigh` 仅部分模型支持。 | `medium` |
|
||||
| **ENFORCE_FORMATTING** | 在系统提示词中添加格式化指导。 | `True` |
|
||||
| **ENABLE_MCP_SERVER** | 启用直接 MCP 客户端连接 (建议)。 | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | 启用 OpenWebUI 工具 (包括自定义和服务器工具)。 | `True` |
|
||||
| **BYOK_ENABLED** | 启用 BYOK (自带 Key) 模式以使用自定义供应商。 | `False` |
|
||||
| **BYOK_TYPE** | BYOK 供应商类型: `openai`, `azure`, `anthropic`。 | `openai` |
|
||||
| **BYOK_BASE_URL** | BYOK 基础 URL (如 `https://api.openai.com/v1`)。 | - |
|
||||
| **BYOK_API_KEY** | BYOK API Key (全局设置)。 | - |
|
||||
| **BYOK_BEARER_TOKEN** | BYOK Bearer Token (全局,覆盖 API Key)。 | - |
|
||||
| **BYOK_WIRE_API** | BYOK 通信协议: `completions`, `responses`。 | `completions` |
|
||||
|
||||
#### 用户 Valves(按用户覆盖)
|
||||
|
||||
@@ -69,7 +79,6 @@
|
||||
| **SHOW_THINKING** | 是否显示思考过程。 | `True` |
|
||||
| **ENABLE_OPENWEBUI_TOOLS** | 启用 OpenWebUI 工具(覆盖全局设置)。 | `True` |
|
||||
| **ENABLE_MCP_SERVER** | 启用动态 MCP 服务器加载(覆盖全局设置)。 | `True` |
|
||||
| **ENFORCE_FORMATTING** | 强制启用格式化指导(覆盖全局设置)。 | `True` |
|
||||
|
||||
## ⭐ 支持
|
||||
|
||||
@@ -85,23 +94,23 @@
|
||||
2. 点击 **Generate new token (fine-grained)**。
|
||||
3. **Repository access**: 选择 **Public Repositories** (最简单) 或 **All repositories**。
|
||||
4. **Permissions**:
|
||||
* 如果您选择了 **All repositories**,则必须点击 **Account permissions**。
|
||||
* 找到 **Copilot Requests**,选择 **Access**。
|
||||
- 如果您选择了 **All repositories**,则必须点击 **Account permissions**。
|
||||
- 找到 **Copilot Requests**,选择 **Access**。
|
||||
5. 生成并复制令牌。
|
||||
|
||||
## 📋 依赖说明
|
||||
|
||||
该 Pipe 会自动尝试安装以下依赖(如果环境中缺失):
|
||||
|
||||
* `github-copilot-sdk` (Python 包)
|
||||
* `github-copilot-cli` (二进制文件,通过官方脚本安装)
|
||||
- `github-copilot-sdk` (Python 包)
|
||||
- `github-copilot-cli` (二进制文件,通过官方脚本安装)
|
||||
|
||||
## 故障排除 (Troubleshooting) ❓
|
||||
|
||||
* **图片及多模态使用说明**:
|
||||
* 确保 `MODEL_ID` 是支持多模态的模型。
|
||||
* **看不到思考过程**:
|
||||
* 确认已开启**流式输出**,且所选模型支持推理输出。
|
||||
- **图片及多模态使用说明**:
|
||||
- 确保 `MODEL_ID` 是支持多模态的模型。
|
||||
- **看不到思考过程**:
|
||||
- 确认已开启**流式输出**,且所选模型支持推理输出。
|
||||
|
||||
## 更新日志
|
||||
|
||||
|
||||
@@ -0,0 +1,424 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Copilot SDK System Message Test Script
|
||||
Tests whether system_message is properly applied during session.resume
|
||||
|
||||
This script verifies the bug hypothesis:
|
||||
- session.resume with system_message config may not reliably update the system prompt
|
||||
|
||||
Test scenarios:
|
||||
1. Create a new session with a custom system message
|
||||
2. Resume the same session with a DIFFERENT system message
|
||||
3. Ask the model to describe its current system instructions
|
||||
|
||||
Requirements:
|
||||
- github-copilot-sdk>=0.1.23
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from copilot import CopilotClient
|
||||
from copilot.types import SessionConfig
|
||||
from copilot.generated.session_events import SessionEventType
|
||||
|
||||
|
||||
# Test system messages
|
||||
SYSTEM_MSG_A = """You are a helpful assistant named "ALPHA".
|
||||
When asked about your name or identity, you MUST respond: "I am ALPHA, the first assistant."
|
||||
Always start your responses with "[ALPHA]:" prefix.
|
||||
"""
|
||||
|
||||
SYSTEM_MSG_B = """You are a helpful assistant named "BETA".
|
||||
When asked about your name or identity, you MUST respond: "I am BETA, the second assistant."
|
||||
Always start your responses with "[BETA]:" prefix.
|
||||
"""
|
||||
|
||||
|
||||
async def send_and_get_response(session, prompt: str) -> str:
|
||||
"""Send a message and collect the full response using event subscription."""
|
||||
full_response = ""
|
||||
response_complete = asyncio.Event()
|
||||
|
||||
def event_handler(event):
|
||||
nonlocal full_response
|
||||
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
|
||||
delta = getattr(event.data, "content", "") or ""
|
||||
print(delta, end="", flush=True)
|
||||
full_response += delta
|
||||
elif event.type == SessionEventType.ASSISTANT_MESSAGE:
|
||||
# Final complete message
|
||||
content = getattr(event.data, "content", "") or ""
|
||||
if content and not full_response:
|
||||
full_response = content
|
||||
print(content, end="", flush=True)
|
||||
elif event.type == SessionEventType.SESSION_IDLE:
|
||||
response_complete.set()
|
||||
elif event.type == SessionEventType.ASSISTANT_TURN_END:
|
||||
response_complete.set()
|
||||
|
||||
# Subscribe to events
|
||||
unsubscribe = session.on(event_handler)
|
||||
|
||||
try:
|
||||
# Send the message
|
||||
await session.send({"prompt": prompt, "mode": "immediate"})
|
||||
# Wait for completion (with timeout)
|
||||
await asyncio.wait_for(response_complete.wait(), timeout=120)
|
||||
print() # newline after completion
|
||||
finally:
|
||||
unsubscribe()
|
||||
|
||||
return full_response
|
||||
|
||||
|
||||
async def test_new_session_system_message(client: CopilotClient):
|
||||
"""Test 1: New session with system message A"""
|
||||
print("\n" + "=" * 60)
|
||||
print("TEST 1: New Session with System Message A (ALPHA)")
|
||||
print("=" * 60)
|
||||
|
||||
session_config = SessionConfig(
|
||||
session_id="test-session-001",
|
||||
model="gpt-5-mini",
|
||||
streaming=True,
|
||||
system_message={
|
||||
"mode": "replace",
|
||||
"content": SYSTEM_MSG_A,
|
||||
},
|
||||
)
|
||||
|
||||
session = await client.create_session(config=session_config)
|
||||
print(f"✅ Created new session: {session.session_id}")
|
||||
|
||||
print("\n📤 Asking: 'What is your name?'")
|
||||
print("📥 Response: ", end="")
|
||||
response = await send_and_get_response(session, "What is your name?")
|
||||
|
||||
if "ALPHA" in response:
|
||||
print("✅ SUCCESS: Model correctly identified as ALPHA")
|
||||
else:
|
||||
print("⚠️ WARNING: Model did NOT identify as ALPHA")
|
||||
|
||||
return session
|
||||
|
||||
|
||||
async def test_resume_session_with_new_system_message(
|
||||
client: CopilotClient, session_id: str
|
||||
):
|
||||
"""Test 2: Resume session with DIFFERENT system message B"""
|
||||
print("\n" + "=" * 60)
|
||||
print("TEST 2: Resume Session with System Message B (BETA)")
|
||||
print("=" * 60)
|
||||
|
||||
resume_config = {
|
||||
"model": "gpt-5-mini",
|
||||
"streaming": True,
|
||||
"system_message": {
|
||||
"mode": "replace",
|
||||
"content": SYSTEM_MSG_B,
|
||||
},
|
||||
}
|
||||
|
||||
print(f"📋 Resume config includes system_message with mode='replace'")
|
||||
print(f"📋 New system_message content: BETA identity")
|
||||
|
||||
session = await client.resume_session(session_id, resume_config)
|
||||
print(f"✅ Resumed session: {session.session_id}")
|
||||
|
||||
print("\n📤 Asking: 'What is your name now? Did your identity change?'")
|
||||
print("📥 Response: ", end="")
|
||||
response = await send_and_get_response(
|
||||
session, "What is your name now? Did your identity change?"
|
||||
)
|
||||
|
||||
if "BETA" in response:
|
||||
print("✅ SUCCESS: System message was updated to BETA")
|
||||
return True
|
||||
elif "ALPHA" in response:
|
||||
print("❌ BUG CONFIRMED: System message was NOT updated (still ALPHA)")
|
||||
return False
|
||||
else:
|
||||
print("⚠️ INCONCLUSIVE: Model response doesn't clearly indicate identity")
|
||||
return None
|
||||
|
||||
|
||||
async def test_resume_without_system_message(client: CopilotClient, session_id: str):
|
||||
"""Test 3: Resume session without specifying system_message"""
|
||||
print("\n" + "=" * 60)
|
||||
print("TEST 3: Resume Session WITHOUT System Message")
|
||||
print("=" * 60)
|
||||
|
||||
resume_config = {
|
||||
"model": "gpt-4o",
|
||||
"streaming": True,
|
||||
# No system_message specified
|
||||
}
|
||||
|
||||
session = await client.resume_session(session_id, resume_config)
|
||||
print(f"✅ Resumed session: {session.session_id}")
|
||||
|
||||
print("\n📤 Asking: 'What is your name? Tell me your current identity.'")
|
||||
print("📥 Response: ", end="")
|
||||
response = await send_and_get_response(
|
||||
session, "What is your name? Tell me your current identity."
|
||||
)
|
||||
|
||||
if "ALPHA" in response:
|
||||
print(
|
||||
"ℹ️ Without system_message: Model still remembers ALPHA from original session"
|
||||
)
|
||||
elif "BETA" in response:
|
||||
print("ℹ️ Without system_message: Model remembers BETA from Test 2")
|
||||
else:
|
||||
print("ℹ️ Model identity unclear")
|
||||
|
||||
|
||||
async def main():
|
||||
print("=" * 60)
|
||||
print("🧪 Copilot SDK System Message Resume Test")
|
||||
print("=" * 60)
|
||||
print(f"Time: {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
print(f"Testing with SDK from: {CopilotClient.__module__}")
|
||||
|
||||
# Create client with explicit CLI path if provided
|
||||
cli_path = os.environ.get("COPILOT_CLI_PATH")
|
||||
client_config = {"log_level": "info"}
|
||||
if cli_path:
|
||||
client_config["cli_path"] = cli_path
|
||||
|
||||
client = CopilotClient(client_config)
|
||||
|
||||
try:
|
||||
await client.start()
|
||||
print("✅ Client started successfully")
|
||||
|
||||
# Test 1: Create new session with system message A
|
||||
session = await test_new_session_system_message(client)
|
||||
session_id = session.session_id
|
||||
|
||||
# Wait a bit before resuming
|
||||
print("\n⏳ Waiting 2 seconds before resume test...")
|
||||
await asyncio.sleep(2)
|
||||
|
||||
# Test 2: Resume with different system message B
|
||||
bug_confirmed = await test_resume_session_with_new_system_message(
|
||||
client, session_id
|
||||
)
|
||||
|
||||
# Test 3: Resume without system message
|
||||
await test_resume_without_system_message(client, session_id)
|
||||
|
||||
# Summary
|
||||
print("\n" + "=" * 60)
|
||||
print("📊 TEST SUMMARY (Native Copilot)")
|
||||
print("=" * 60)
|
||||
if bug_confirmed is False:
|
||||
print(
|
||||
"❌ BUG CONFIRMED: session.resume does NOT apply system_message updates"
|
||||
)
|
||||
print(" The system message from create_session persists even when")
|
||||
print(" resume_session specifies a different system_message.")
|
||||
print("\n WORKAROUND: Inject system context into user prompt instead.")
|
||||
elif bug_confirmed is True:
|
||||
print("✅ NO BUG: session.resume correctly updates system_message")
|
||||
else:
|
||||
print("⚠️ INCONCLUSIVE: Could not determine if bug exists")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
await client.stop()
|
||||
print("\n✅ Client stopped")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# BYOK OpenAI Test
|
||||
# =============================================================================
|
||||
|
||||
|
||||
async def test_byok_new_session(client: CopilotClient, provider_config: dict):
|
||||
"""BYOK Test 1: New session with BYOK provider and system message A"""
|
||||
print("\n" + "=" * 60)
|
||||
print("BYOK TEST 1: New Session with BYOK Provider + System Message A (ALPHA)")
|
||||
print("=" * 60)
|
||||
print(
|
||||
f"📋 Provider: {provider_config.get('type')} @ {provider_config.get('base_url')}"
|
||||
)
|
||||
|
||||
session_config = SessionConfig(
|
||||
session_id="byok-test-session-001",
|
||||
model="gpt-4o", # or your model name
|
||||
streaming=True,
|
||||
provider=provider_config,
|
||||
system_message={
|
||||
"mode": "replace",
|
||||
"content": SYSTEM_MSG_A,
|
||||
},
|
||||
)
|
||||
|
||||
session = await client.create_session(config=session_config)
|
||||
print(f"✅ Created BYOK session: {session.session_id}")
|
||||
|
||||
print("\n📤 Asking: 'What is your name?'")
|
||||
print("📥 Response: ", end="")
|
||||
response = await send_and_get_response(session, "What is your name?")
|
||||
|
||||
if "ALPHA" in response:
|
||||
print("✅ SUCCESS: Model correctly identified as ALPHA")
|
||||
else:
|
||||
print("⚠️ WARNING: Model did NOT identify as ALPHA")
|
||||
|
||||
return session
|
||||
|
||||
|
||||
async def test_byok_resume_with_new_system_message(
|
||||
client: CopilotClient, session_id: str, provider_config: dict
|
||||
):
|
||||
"""BYOK Test 2: Resume BYOK session with DIFFERENT system message B"""
|
||||
print("\n" + "=" * 60)
|
||||
print("BYOK TEST 2: Resume BYOK Session with System Message B (BETA)")
|
||||
print("=" * 60)
|
||||
|
||||
resume_config = {
|
||||
"model": "gpt-4o",
|
||||
"streaming": True,
|
||||
"provider": provider_config,
|
||||
"system_message": {
|
||||
"mode": "replace",
|
||||
"content": SYSTEM_MSG_B,
|
||||
},
|
||||
}
|
||||
|
||||
print(f"📋 Resume config includes system_message with mode='replace'")
|
||||
print(f"📋 New system_message content: BETA identity")
|
||||
print(
|
||||
f"📋 Provider: {provider_config.get('type')} @ {provider_config.get('base_url')}"
|
||||
)
|
||||
|
||||
session = await client.resume_session(session_id, resume_config)
|
||||
print(f"✅ Resumed BYOK session: {session.session_id}")
|
||||
|
||||
print("\n📤 Asking: 'What is your name now? Did your identity change?'")
|
||||
print("📥 Response: ", end="")
|
||||
response = await send_and_get_response(
|
||||
session, "What is your name now? Did your identity change?"
|
||||
)
|
||||
|
||||
if "BETA" in response:
|
||||
print("✅ SUCCESS: System message was updated to BETA")
|
||||
return True
|
||||
elif "ALPHA" in response:
|
||||
print("❌ BUG CONFIRMED: System message was NOT updated (still ALPHA)")
|
||||
return False
|
||||
else:
|
||||
print("⚠️ INCONCLUSIVE: Model response doesn't clearly indicate identity")
|
||||
return None
|
||||
|
||||
|
||||
async def main_byok():
|
||||
"""Run BYOK-specific tests"""
|
||||
print("=" * 60)
|
||||
print("🧪 Copilot SDK BYOK System Message Resume Test")
|
||||
print("=" * 60)
|
||||
print(f"Time: {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
|
||||
# Get BYOK configuration from environment
|
||||
byok_api_key = os.environ.get("BYOK_API_KEY") or os.environ.get("OPENAI_API_KEY")
|
||||
byok_base_url = os.environ.get("BYOK_BASE_URL", "https://api.openai.com/v1")
|
||||
byok_model = os.environ.get("BYOK_MODEL", "gpt-4o")
|
||||
|
||||
if not byok_api_key:
|
||||
print(
|
||||
"❌ Error: Please set BYOK_API_KEY or OPENAI_API_KEY environment variable"
|
||||
)
|
||||
print(" export BYOK_API_KEY='your_api_key'")
|
||||
print(" export BYOK_BASE_URL='https://api.openai.com/v1' # optional")
|
||||
print(" export BYOK_MODEL='gpt-4o' # optional")
|
||||
return
|
||||
|
||||
provider_config = {
|
||||
"type": "openai",
|
||||
"base_url": byok_base_url,
|
||||
"api_key": byok_api_key,
|
||||
}
|
||||
|
||||
print(f"📋 BYOK Provider: openai @ {byok_base_url}")
|
||||
print(f"📋 BYOK Model: {byok_model}")
|
||||
|
||||
# Create client
|
||||
cli_path = os.environ.get("COPILOT_CLI_PATH")
|
||||
client_config = {"log_level": "info"}
|
||||
if cli_path:
|
||||
client_config["cli_path"] = cli_path
|
||||
|
||||
client = CopilotClient(client_config)
|
||||
|
||||
try:
|
||||
await client.start()
|
||||
print("✅ Client started successfully")
|
||||
|
||||
# BYOK Test 1: Create new session with BYOK provider
|
||||
session = await test_byok_new_session(client, provider_config)
|
||||
session_id = session.session_id
|
||||
|
||||
# Wait a bit before resuming
|
||||
print("\n⏳ Waiting 2 seconds before resume test...")
|
||||
await asyncio.sleep(2)
|
||||
|
||||
# BYOK Test 2: Resume with different system message B
|
||||
bug_confirmed = await test_byok_resume_with_new_system_message(
|
||||
client, session_id, provider_config
|
||||
)
|
||||
|
||||
# Summary
|
||||
print("\n" + "=" * 60)
|
||||
print("📊 BYOK TEST SUMMARY")
|
||||
print("=" * 60)
|
||||
if bug_confirmed is False:
|
||||
print(
|
||||
"❌ BYOK BUG CONFIRMED: session.resume does NOT apply system_message updates"
|
||||
)
|
||||
print(" In BYOK mode, the system message from create_session persists")
|
||||
print(" even when resume_session specifies a different system_message.")
|
||||
print("\n WORKAROUND: Inject system context into user prompt instead.")
|
||||
elif bug_confirmed is True:
|
||||
print("✅ BYOK NO BUG: session.resume correctly updates system_message")
|
||||
else:
|
||||
print("⚠️ BYOK INCONCLUSIVE: Could not determine if bug exists")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
await client.stop()
|
||||
print("\n✅ Client stopped")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Copilot SDK System Message Resume Test"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--byok",
|
||||
action="store_true",
|
||||
help="Run BYOK (Bring Your Own Key) test instead of native Copilot test",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.byok:
|
||||
print("Running BYOK test mode...")
|
||||
asyncio.run(main_byok())
|
||||
else:
|
||||
print("Running native Copilot test mode...")
|
||||
print("(Use --byok flag for BYOK provider test)")
|
||||
asyncio.run(main())
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user