clew-code 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +292 -299
- package/dist/main.js +2745 -2869
- package/docs/architecture.html +148 -145
- package/docs/architecture.th.html +79 -78
- package/docs/clew-code-architecture.html +1125 -0
- package/docs/commands.html +224 -223
- package/docs/commands.th.html +131 -130
- package/docs/configuration.html +147 -145
- package/docs/configuration.th.html +108 -106
- package/docs/css/styles.css +48 -42
- package/docs/daemon.html +129 -128
- package/docs/daemon.th.html +73 -72
- package/docs/features/bridge-mode.html +99 -98
- package/docs/features/bridge-mode.th.html +90 -89
- package/docs/features/evals.html +182 -181
- package/docs/features/evals.th.html +90 -89
- package/docs/features/peer.html +178 -177
- package/docs/features/searxng-search.html +151 -150
- package/docs/features/searxng-search.th.html +95 -94
- package/docs/features/sentry-setup.html +157 -156
- package/docs/features/sentry-setup.th.html +97 -96
- package/docs/index.html +299 -298
- package/docs/index.th.html +292 -290
- package/docs/installation.html +105 -103
- package/docs/installation.th.html +105 -103
- package/docs/internals/growthbook-ab-testing.html +113 -112
- package/docs/internals/growthbook-ab-testing.th.html +81 -80
- package/docs/internals/hidden-features.html +149 -147
- package/docs/internals/hidden-features.th.html +109 -107
- package/docs/js/main.js +83 -3
- package/docs/loop.html +181 -180
- package/docs/loop.th.html +227 -226
- package/docs/mcp.html +247 -246
- package/docs/mcp.th.html +207 -206
- package/docs/models.html +111 -110
- package/docs/models.th.html +61 -60
- package/docs/peer.html +236 -235
- package/docs/peer.th.html +280 -279
- package/docs/permission-model.html +102 -101
- package/docs/permission-model.th.html +67 -66
- package/docs/plugins.html +102 -101
- package/docs/plugins.th.html +79 -78
- package/docs/providers.html +126 -117
- package/docs/providers.th.html +80 -78
- package/docs/quick-start.html +93 -92
- package/docs/quick-start.th.html +40 -39
- package/docs/research-memory.html +82 -79
- package/docs/research-memory.th.html +72 -71
- package/docs/skills.html +117 -116
- package/docs/skills.th.html +90 -89
- package/docs/tools.html +170 -169
- package/docs/tools.th.html +84 -83
- package/docs/troubleshooting.html +106 -105
- package/docs/troubleshooting.th.html +85 -84
- package/package.json +164 -162
- package/docs/taste.html +0 -436
- package/docs/taste.th.html +0 -236
package/docs/plugins.th.html
CHANGED
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="th">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
<link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<header class="header"></header>
|
|
16
|
-
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
-
<div class="content-wrap"><main class="content">
|
|
18
|
-
<div class="breadcrumbs"><a href="index.th.html"
|
|
19
|
-
<h1
|
|
20
|
-
<p class="section-subtitle"
|
|
21
|
-
|
|
22
|
-
<h2
|
|
23
|
-
<table>
|
|
24
|
-
<tr><th
|
|
25
|
-
<tr><td
|
|
26
|
-
<tr><td
|
|
27
|
-
<tr><td
|
|
28
|
-
<tr><td
|
|
29
|
-
<tr><td
|
|
30
|
-
</table>
|
|
31
|
-
|
|
32
|
-
<h2
|
|
33
|
-
<table>
|
|
34
|
-
<tr><th
|
|
35
|
-
<tr><td><code>PreToolUse</code></td><td
|
|
36
|
-
<tr><td><code>PostToolUse</code></td><td
|
|
37
|
-
<tr><td><code>PreBash</code></td><td
|
|
38
|
-
<tr><td><code>PostPrompt</code></td><td
|
|
39
|
-
</table>
|
|
40
|
-
|
|
41
|
-
<h2
|
|
42
|
-
<pre><code>/plugin #
|
|
43
|
-
/plugin-details #
|
|
44
|
-
/reload-plugins #
|
|
45
|
-
|
|
46
|
-
<h2
|
|
47
|
-
<table>
|
|
48
|
-
<tr><th
|
|
49
|
-
<tr><td><code>commit-commands</code></td><td
|
|
50
|
-
<tr><td><code>code-review</code></td><td
|
|
51
|
-
<tr><td><code>feature-dev</code></td><td
|
|
52
|
-
<tr><td><code>frontend-design</code></td><td
|
|
53
|
-
<tr><td><code>verify</code></td><td>typecheck, lint, build,
|
|
54
|
-
<tr><td><code>debug</code></td><td
|
|
55
|
-
</table>
|
|
56
|
-
|
|
57
|
-
<h2
|
|
58
|
-
<pre><code>my-plugin/
|
|
59
|
-
manifest.json #
|
|
60
|
-
commands/ #
|
|
61
|
-
skills/ #
|
|
62
|
-
agents/ #
|
|
63
|
-
hooks/ #
|
|
64
|
-
|
|
65
|
-
<footer class="footer">
|
|
66
|
-
<span>Clew Code v0.2.
|
|
67
|
-
<div class="footer-links">
|
|
68
|
-
<a href="https://github.com/
|
|
69
|
-
<a href="https://github.com/
|
|
70
|
-
</div>
|
|
71
|
-
</footer>
|
|
72
|
-
</main>
|
|
73
|
-
<nav class="toc-sidebar"></nav>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
<script src="js/main.js"></script>
|
|
77
|
-
</body>
|
|
78
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="th">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>ปลั๊à¸à¸à¸´à¸™ — Clew</title>
|
|
7
|
+
<meta name="description" content="ขยาย Clew ด้วยปลั๊à¸à¸à¸´à¸™ — คำสั่ง, เà¸à¹€à¸ˆà¸™à¸•์, สà¸à¸´à¸¥, ฮุค, เซิร์ฟเวà¸à¸£à¹Œ MCP, à¹à¸¥à¸°à¸£à¸à¸‡à¸£à¸±à¸š marketplace">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
+
<link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<header class="header"></header>
|
|
16
|
+
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
+
<div class="content-wrap"><main class="content">
|
|
18
|
+
<div class="breadcrumbs"><a href="index.th.html">หน้าà¹à¸£à¸</a><span class="sep">/</span><span>ปลั๊à¸à¸à¸´à¸™</span></div>
|
|
19
|
+
<h1>ปลั๊à¸à¸à¸´à¸™</h1>
|
|
20
|
+
<p class="section-subtitle">ปลั๊à¸à¸à¸´à¸™à¸‚ยาย Clew ด้วยคำสั่งที่à¸à¸³à¸«à¸™à¸”เà¸à¸‡, เà¸à¹€à¸ˆà¸™à¸•์, สà¸à¸´à¸¥, ฮุคà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£, เซิร์ฟเวà¸à¸£à¹Œ MCP, à¹à¸¥à¸° LSP integrations</p>
|
|
21
|
+
|
|
22
|
+
<h2>สิ่งที่ปลั๊à¸à¸à¸´à¸™à¸ªà¸²à¸¡à¸²à¸£à¸–ให้ได้</h2>
|
|
23
|
+
<table>
|
|
24
|
+
<tr><th>ส่วนขยาย</th><th>คำà¸à¸˜à¸´à¸šà¸²à¸¢</th></tr>
|
|
25
|
+
<tr><td>คำสั่ง Slash</td><td>à¸à¸²à¸£à¹ƒà¸Šà¹‰à¸‡à¸²à¸™ <code>/command</code> ที่à¸à¸³à¸«à¸™à¸”เà¸à¸‡à¸œà¹ˆà¸²à¸™ manifest ปลั๊à¸à¸à¸´à¸™</td></tr>
|
|
26
|
+
<tr><td>เà¸à¹€à¸ˆà¸™à¸•์</td><td>à¸à¸²à¸£à¸•ั้งค่าเà¸à¹€à¸ˆà¸™à¸•์เฉพาะทางพร้à¸à¸¡ prompts à¹à¸¥à¸°à¸à¸²à¸£à¹€à¸‚้าถึงเครื่à¸à¸‡à¸¡à¸·à¸</td></tr>
|
|
27
|
+
<tr><td>สà¸à¸´à¸¥</td><td>คำà¹à¸™à¸°à¸™à¸³à¸‡à¸²à¸™à¸—ี่ใช้ซ้ำได้จาà¸à¹„ดเรà¸à¸—à¸à¸£à¸µà¸ªà¸à¸´à¸¥à¸‚à¸à¸‡à¸›à¸¥à¸±à¹Šà¸à¸à¸´à¸™</td></tr>
|
|
28
|
+
<tr><td>ฮุคà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£</td><td>ฮุคà¸à¹ˆà¸à¸™/หลังที่ขั้นตà¸à¸™ tool, bash, prompt, à¹à¸¥à¸° edit</td></tr>
|
|
29
|
+
<tr><td>เซิร์ฟเวà¸à¸£à¹Œ MCP</td><td>คำจำà¸à¸±à¸”ความเซิร์ฟเวà¸à¸£à¹Œ Model Context Protocol ที่มาพร้à¸à¸¡à¸›à¸¥à¸±à¹Šà¸à¸à¸´à¸™</td></tr>
|
|
30
|
+
</table>
|
|
31
|
+
|
|
32
|
+
<h2>ระบบฮุค</h2>
|
|
33
|
+
<table>
|
|
34
|
+
<tr><th>จุดฮุค</th><th>เมื่à¸à¸—ำงาน</th></tr>
|
|
35
|
+
<tr><td><code>PreToolUse</code></td><td>à¸à¹ˆà¸à¸™à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¸”ำเนินà¸à¸²à¸£ — à¸à¸²à¸£à¸•รวจสà¸à¸š, à¸à¸²à¸£à¹à¸à¹‰à¹„ขà¸à¸´à¸™à¸žà¸¸à¸•, à¸à¸²à¸£à¸šà¸±à¸™à¸—ึà¸</td></tr>
|
|
36
|
+
<tr><td><code>PostToolUse</code></td><td>หลังจาà¸à¹€à¸„รื่à¸à¸‡à¸¡à¸·à¸à¹€à¸ªà¸£à¹‡à¸ˆ — à¸à¸²à¸£à¹à¸›à¸¥à¸‡à¸œà¸¥à¸¥à¸±à¸žà¸˜à¹Œ, à¸à¸²à¸£à¸•รวจสà¸à¸š</td></tr>
|
|
37
|
+
<tr><td><code>PreBash</code></td><td>à¸à¹ˆà¸à¸™à¸£à¸±à¸™à¸„ำสั่ง shell — à¸à¸²à¸£à¸—ำความสะà¸à¸²à¸”, à¸à¸²à¸£à¹€à¸žà¸´à¹ˆà¸¡ env</td></tr>
|
|
38
|
+
<tr><td><code>PostPrompt</code></td><td>หลังสร้าง prompt — à¸à¸²à¸£à¹€à¸žà¸´à¹ˆà¸¡à¸šà¸£à¸´à¸šà¸—</td></tr>
|
|
39
|
+
</table>
|
|
40
|
+
|
|
41
|
+
<h2>à¸à¸²à¸£à¸ˆà¸±à¸”à¸à¸²à¸£à¸›à¸¥à¸±à¹Šà¸à¸à¸´à¸™</h2>
|
|
42
|
+
<pre><code>/plugin # à¹à¸ªà¸”งปลั๊à¸à¸à¸´à¸™à¸—ี่ติดตั้ง
|
|
43
|
+
/plugin-details # à¹à¸ªà¸”งข้à¸à¸¡à¸¹à¸¥à¸›à¸¥à¸±à¹Šà¸à¸à¸´à¸™à¹‚ดยละเà¸à¸µà¸¢à¸”
|
|
44
|
+
/reload-plugins # เปิดใช้งานà¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡à¸›à¸¥à¸±à¹Šà¸à¸à¸´à¸™</code></pre>
|
|
45
|
+
|
|
46
|
+
<h2>ปลั๊à¸à¸à¸´à¸™à¹ƒà¸™à¸•ัว</h2>
|
|
47
|
+
<table>
|
|
48
|
+
<tr><th>ปลั๊à¸à¸à¸´à¸™</th><th>คำà¸à¸˜à¸´à¸šà¸²à¸¢</th></tr>
|
|
49
|
+
<tr><td><code>commit-commands</code></td><td>เวิร์à¸à¹‚ฟลว์ Git — commit, push, สร้าง PR</td></tr>
|
|
50
|
+
<tr><td><code>code-review</code></td><td>รีวิวโค้ด PR à¸à¸±à¸•โนมัติ</td></tr>
|
|
51
|
+
<tr><td><code>feature-dev</code></td><td>พัฒนาฟีเจà¸à¸£à¹Œà¹à¸šà¸šà¸¡à¸µà¸„ำà¹à¸™à¸°à¸™à¸³à¸žà¸£à¹‰à¸à¸¡à¸„วามเข้าใจโค้ดเบส</td></tr>
|
|
52
|
+
<tr><td><code>frontend-design</code></td><td>สร้าง UI/UX ระดับโปรดัà¸à¸Šà¸±à¸™</td></tr>
|
|
53
|
+
<tr><td><code>verify</code></td><td>typecheck, lint, build, à¹à¸¥à¸° test pipeline</td></tr>
|
|
54
|
+
<tr><td><code>debug</code></td><td>ช่วยเหลืà¸à¹à¸¥à¸°à¸§à¸´à¸™à¸´à¸ˆà¸‰à¸±à¸¢à¸à¸²à¸£à¸”ีบัà¸</td></tr>
|
|
55
|
+
</table>
|
|
56
|
+
|
|
57
|
+
<h2>โครงสร้างปลั๊à¸à¸à¸´à¸™</h2>
|
|
58
|
+
<pre><code>my-plugin/
|
|
59
|
+
manifest.json # ข้à¸à¸¡à¸¹à¸¥à¹€à¸¡à¸•าà¹à¸¥à¸°à¸à¸²à¸£à¸›à¸£à¸°à¸à¸²à¸¨à¸„วามสามารถ
|
|
60
|
+
commands/ # คำสั่ง slash ที่à¸à¸³à¸«à¸™à¸”เà¸à¸‡
|
|
61
|
+
skills/ # คำà¹à¸™à¸°à¸™à¸³à¸‡à¸²à¸™à¸—ี่ใช้ซ้ำได้
|
|
62
|
+
agents/ # à¸à¸²à¸£à¸•ั้งค่าเà¸à¹€à¸ˆà¸™à¸•์
|
|
63
|
+
hooks/ # à¸à¸²à¸£à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸®à¸¸à¸„</code></pre>
|
|
64
|
+
|
|
65
|
+
<footer class="footer">
|
|
66
|
+
<span>Clew Code v0.2.7 — โà¸à¹€à¸žà¸™à¸‹à¸à¸£à¹Œà¸ª</span>
|
|
67
|
+
<div class="footer-links">
|
|
68
|
+
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
69
|
+
<a href="https://github.com/ClewCode/ClewCode/issues">ปัà¸à¸«à¸²</a>
|
|
70
|
+
</div>
|
|
71
|
+
</footer>
|
|
72
|
+
</main>
|
|
73
|
+
<nav class="toc-sidebar"></nav>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<script src="js/main.js"></script>
|
|
77
|
+
</body>
|
|
78
|
+
</html>
|
|
79
|
+
|
package/docs/providers.html
CHANGED
|
@@ -1,117 +1,126 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Providers
|
|
7
|
-
<meta name="description" content="Complete AI provider reference for Clew
|
|
8
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
<link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<header class="header"></header>
|
|
16
|
-
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
-
<div class="content-wrap"><main class="content">
|
|
18
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Providers</span></div>
|
|
19
|
-
<h1>Providers</h1>
|
|
20
|
-
<p class="section-subtitle">Clew supports <strong>27 AI providers</strong> with a unified adapter layer. Set your API keys as environment variables and switch between providers at runtime with <code>/model</code>.</p>
|
|
21
|
-
|
|
22
|
-
<p>Provider configuration is declared in <code>src/services/ai/providers.json</code>. The <strong>ProviderManager</strong> resolves API keys, selects models, and manages provider config. Non-Anthropic providers are normalized via the <strong>AnthropicAdapter</strong> or <strong>GoogleAdapter</strong>.</p>
|
|
23
|
-
|
|
24
|
-
<h2>All Providers</h2>
|
|
25
|
-
<table>
|
|
26
|
-
<tr><th>Provider</th><th>Env Key</th><th>Default Model</th><th>Notes</th></tr>
|
|
27
|
-
<tr><td>Anthropic</td><td><code>ANTHROPIC_API_KEY</code></td><td>claude-sonnet-4-7</td><td>Native Claude support with full tool calling and reasoning. Context: 1M tokens.</td></tr>
|
|
28
|
-
<tr><td>OpenAI</td><td><code>OPENAI_API_KEY</code></td><td>gpt-5.5</td><td>GPT-5.5, GPT-5.5 Pro, GPT-5.4 Mini. Context: 1M+ tokens.</td></tr>
|
|
29
|
-
<tr><td>Google</td><td><code>GOOGLE_API_KEY</code></td><td>gemini-3.1-flash</td><td>Gemini 3.1 Flash, Pro. Context: up to 2M tokens. Uses GoogleAdapter.</td></tr>
|
|
30
|
-
<tr><td>GitHub Copilot</td><td><code>COPILOT_GITHUB_TOKEN</code></td><td>gpt-5.5</td><td>Access via GitHub token. Includes Claude and GPT models. Context: 1M tokens.</td></tr>
|
|
31
|
-
<tr><td>OpenRouter</td><td><code>OPENROUTER_API_KEY</code></td><td
|
|
32
|
-
<tr><td>DeepSeek</td><td><code>DEEPSEEK_API_KEY</code></td><td>deepseek-v4-pro</td><td>DeepSeek V4 Pro, V4 Flash. Context: 1M tokens. MoE architecture.</td></tr>
|
|
33
|
-
<tr><td>OpenCode</td><td><code>OPENCODE_API_KEY</code></td><td>claude-opus-4-7</td><td>OpenCode AI gateway. OpenAI-compatible. Includes Claude, GPT, Gemini, Kimi, GLM, MiniMax.</td></tr>
|
|
34
|
-
<tr><td>OpenCode Go</td><td><code>OPENCODE_GO_API_KEY</code></td><td>minimax-m2.7</td><td>Low cost subscription tier for open coding models.</td></tr>
|
|
35
|
-
<tr><td>Cline API</td><td><code>CLINE_API_KEY</code></td><td>anthropic/claude-opus-4-7</td><td>OpenAI-compatible. Model IDs format: provider/model-name.</td></tr>
|
|
36
|
-
<tr><td>Groq</td><td><code>GROQ_API_KEY</code></td><td
|
|
37
|
-
<tr><td>xAI</td><td><code>XAI_API_KEY</code></td><td>grok-4-20</td><td>Grok 4.20, Grok 4. Context: 128K tokens. Vision and tool calling.</td></tr>
|
|
38
|
-
<tr><td>Mistral</td><td><code>MISTRAL_API_KEY</code></td><td>mistral-small-latest</td><td>Mistral Large 4, Small 4, Ministral 3 14B. Tool calling and vision support.</td></tr>
|
|
39
|
-
<tr><td>KiloCode</td><td><code>KILOCODE_API_KEY</code></td><td>kilo-auto/free</td><td>Gateway with 500+ models. Includes free tier.</td></tr>
|
|
40
|
-
<tr><td>Ollama (Local)</td><td><code>OLLAMA_API_KEY</code></td><td>llama3.3</td><td>Local models via Ollama server at <code>http://localhost:11434/v1</code>. Offline-capable.</td></tr>
|
|
41
|
-
<tr><td>Together AI</td><td><code>TOGETHER_API_KEY</code></td><td
|
|
42
|
-
<tr><td>Fireworks AI</td><td><code>FIREWORKS_API_KEY</code></td><td
|
|
43
|
-
<tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td
|
|
44
|
-
<tr><td>Cohere</td><td><code>COHERE_API_KEY</code></td><td>command-r-plus</td><td>Command R+ model. 128K context. No vision.</td></tr>
|
|
45
|
-
<tr><td>Deep Infra</td><td><code>DEEPINFRA_API_KEY</code></td><td
|
|
46
|
-
<tr><td>Perplexity</td><td><code>PERPLEXITY_API_KEY</code></td><td
|
|
47
|
-
<tr><td>Cerebras</td><td><code>CEREBRAS_API_KEY</code></td><td
|
|
48
|
-
<tr><td>SiliconFlow</td><td><code>SILICONFLOW_API_KEY</code></td><td
|
|
49
|
-
<tr><td>Moonshot AI (Kimi)</td><td><code>MOONSHOT_API_KEY</code></td><td>kimi-latest</td><td>Kimi models. 128K context. Vision and tool calling.</td></tr>
|
|
50
|
-
<tr><td>Zhipu AI (GLM)</td><td><code>ZHIPU_API_KEY</code></td><td>glm-4</td><td>GLM-4 model. 128K context.</td></tr>
|
|
51
|
-
<tr><td>Hugging Face</td><td><code>HUGGINGFACE_API_KEY</code></td><td
|
|
52
|
-
<tr><td>Poe</td><td><code>POE_API_KEY</code></td><td
|
|
53
|
-
<tr><td>DigitalOcean</td><td><code>DIGITALOCEAN_API_KEY</code></td><td
|
|
54
|
-
</table>
|
|
55
|
-
|
|
56
|
-
<h2>Provider Selection</h2>
|
|
57
|
-
<p>ProviderManager resolves the active provider by:</p>
|
|
58
|
-
<ol>
|
|
59
|
-
<li>Scanning environment variables for configured API keys</li>
|
|
60
|
-
<li>Loading provider metadata from <code>providers.json</code></li>
|
|
61
|
-
<li>Resolving model names to provider-specific identifiers</li>
|
|
62
|
-
<li>Applying the adapter layer for non-Anthropic providers</li>
|
|
63
|
-
<li>Handling config migration and backward compatibility</li>
|
|
64
|
-
</ol>
|
|
65
|
-
|
|
66
|
-
<h2>Adapter Layer</h2>
|
|
67
|
-
<p>Non-Anthropic providers pass through adapters that normalize:</p>
|
|
68
|
-
<ul>
|
|
69
|
-
<li><strong>Content blocks</strong>
|
|
70
|
-
<li><strong>Tool calls</strong>
|
|
71
|
-
<li><strong>Streaming chunks</strong>
|
|
72
|
-
<li><strong>Errors</strong>
|
|
73
|
-
<li><strong>Usage</strong>
|
|
74
|
-
</ul>
|
|
75
|
-
|
|
76
|
-
<h2>Runtime Switching</h2>
|
|
77
|
-
<pre><code>/model # Interactive model picker
|
|
78
|
-
/model list # List all available models across providers
|
|
79
|
-
/model claude-sonnet-4-7 # Switch to a specific model
|
|
80
|
-
/provider-select # Show or change active provider</code></pre>
|
|
81
|
-
|
|
82
|
-
<h2>Provider Capabilities</h2>
|
|
83
|
-
<p>Each provider declares capabilities in <code>providers.json</code>:</p>
|
|
84
|
-
<ul>
|
|
85
|
-
<li><strong>chat</strong>
|
|
86
|
-
<li><strong>streaming</strong>
|
|
87
|
-
<li><strong>toolCalling</strong>
|
|
88
|
-
<li><strong>vision</strong>
|
|
89
|
-
<li><strong>jsonSchema</strong>
|
|
90
|
-
<li><strong>reasoningEffort</strong>
|
|
91
|
-
<li><strong>contextLength</strong>
|
|
92
|
-
</ul>
|
|
93
|
-
|
|
94
|
-
<h2>Local / Offline Development</h2>
|
|
95
|
-
<pre><code># Ollama
|
|
96
|
-
export OLLAMA_API_KEY=ollama # (any non-empty value)
|
|
97
|
-
export OLLAMA_HOST=http://localhost:11434
|
|
98
|
-
clew
|
|
99
|
-
> /model ollama/llama4:70b
|
|
100
|
-
|
|
101
|
-
# Debug specific provider
|
|
102
|
-
DEBUG=provider:anthropic clew</code></pre>
|
|
103
|
-
|
|
104
|
-
<footer class="footer">
|
|
105
|
-
<span>Clew Code v0.2.
|
|
106
|
-
<div class="footer-links">
|
|
107
|
-
<a href="https://github.com/
|
|
108
|
-
<a href="https://github.com/
|
|
109
|
-
</div>
|
|
110
|
-
</footer>
|
|
111
|
-
</main>
|
|
112
|
-
<nav class="toc-sidebar"></nav>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
<script src="js/main.js"></script>
|
|
116
|
-
</body>
|
|
117
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Providers — Clew</title>
|
|
7
|
+
<meta name="description" content="Complete AI provider reference for Clew — 27 supported providers with configuration and capabilities.">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
+
<link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<header class="header"></header>
|
|
16
|
+
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
17
|
+
<div class="content-wrap"><main class="content">
|
|
18
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Providers</span></div>
|
|
19
|
+
<h1>Providers</h1>
|
|
20
|
+
<p class="section-subtitle">Clew supports <strong>27 AI providers</strong> with a unified adapter layer. Set your API keys as environment variables and switch between providers at runtime with <code>/model</code>.</p>
|
|
21
|
+
|
|
22
|
+
<p>Provider configuration is declared in <code>src/services/ai/providers.json</code>. The <strong>ProviderManager</strong> resolves API keys, selects models, and manages provider config. Non-Anthropic providers are normalized via the <strong>AnthropicAdapter</strong> or <strong>GoogleAdapter</strong>.</p>
|
|
23
|
+
|
|
24
|
+
<h2>All Providers</h2>
|
|
25
|
+
<table>
|
|
26
|
+
<tr><th>Provider</th><th>Env Key</th><th>Default Model</th><th>Notes</th></tr>
|
|
27
|
+
<tr><td>Anthropic</td><td><code>ANTHROPIC_API_KEY</code></td><td>claude-sonnet-4-7</td><td>Native Claude support with full tool calling and reasoning. Context: 1M tokens.</td></tr>
|
|
28
|
+
<tr><td>OpenAI</td><td><code>OPENAI_API_KEY</code></td><td>gpt-5.5</td><td>GPT-5.5, GPT-5.5 Pro, GPT-5.4 Mini. Context: 1M+ tokens.</td></tr>
|
|
29
|
+
<tr><td>Google</td><td><code>GOOGLE_API_KEY</code></td><td>gemini-3.1-flash</td><td>Gemini 3.1 Flash, Pro. Context: up to 2M tokens. Uses GoogleAdapter.</td></tr>
|
|
30
|
+
<tr><td>GitHub Copilot</td><td><code>COPILOT_GITHUB_TOKEN</code></td><td>gpt-5.5</td><td>Access via GitHub token. Includes Claude and GPT models. Context: 1M tokens.</td></tr>
|
|
31
|
+
<tr><td>OpenRouter</td><td><code>OPENROUTER_API_KEY</code></td><td>—</td><td>100+ models via routed API. OpenAI-compatible.</td></tr>
|
|
32
|
+
<tr><td>DeepSeek</td><td><code>DEEPSEEK_API_KEY</code></td><td>deepseek-v4-pro</td><td>DeepSeek V4 Pro, V4 Flash. Context: 1M tokens. MoE architecture.</td></tr>
|
|
33
|
+
<tr><td>OpenCode</td><td><code>OPENCODE_API_KEY</code></td><td>claude-opus-4-7</td><td>OpenCode AI gateway. OpenAI-compatible. Includes Claude, GPT, Gemini, Kimi, GLM, MiniMax.</td></tr>
|
|
34
|
+
<tr><td>OpenCode Go</td><td><code>OPENCODE_GO_API_KEY</code></td><td>minimax-m2.7</td><td>Low cost subscription tier for open coding models.</td></tr>
|
|
35
|
+
<tr><td>Cline API</td><td><code>CLINE_API_KEY</code></td><td>anthropic/claude-opus-4-7</td><td>OpenAI-compatible. Model IDs format: provider/model-name.</td></tr>
|
|
36
|
+
<tr><td>Groq</td><td><code>GROQ_API_KEY</code></td><td>—</td><td>Llama 4 70B, 8B. Fast inference. Context: 128K tokens.</td></tr>
|
|
37
|
+
<tr><td>xAI</td><td><code>XAI_API_KEY</code></td><td>grok-4-20</td><td>Grok 4.20, Grok 4. Context: 128K tokens. Vision and tool calling.</td></tr>
|
|
38
|
+
<tr><td>Mistral</td><td><code>MISTRAL_API_KEY</code></td><td>mistral-small-latest</td><td>Mistral Large 4, Small 4, Ministral 3 14B. Tool calling and vision support.</td></tr>
|
|
39
|
+
<tr><td>KiloCode</td><td><code>KILOCODE_API_KEY</code></td><td>kilo-auto/free</td><td>Gateway with 500+ models. Includes free tier.</td></tr>
|
|
40
|
+
<tr><td>Ollama (Local)</td><td><code>OLLAMA_API_KEY</code></td><td>llama3.3</td><td>Local models via Ollama server at <code>http://localhost:11434/v1</code>. Offline-capable.</td></tr>
|
|
41
|
+
<tr><td>Together AI</td><td><code>TOGETHER_API_KEY</code></td><td>—</td><td>Llama 4 models. OpenAI-compatible.</td></tr>
|
|
42
|
+
<tr><td>Fireworks AI</td><td><code>FIREWORKS_API_KEY</code></td><td>—</td><td>Llama 4 70B. Fast inference.</td></tr>
|
|
43
|
+
<tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td>—</td><td>NVIDIA AI Foundation Models. DeepSeek, Llama 3.1, Nemotron. Live model list fetched from API on /model list.</td></tr>
|
|
44
|
+
<tr><td>Cohere</td><td><code>COHERE_API_KEY</code></td><td>command-r-plus</td><td>Command R+ model. 128K context. No vision.</td></tr>
|
|
45
|
+
<tr><td>Deep Infra</td><td><code>DEEPINFRA_API_KEY</code></td><td>—</td><td>OpenAI-compatible gateway. Llama 4 Scout with 327K context.</td></tr>
|
|
46
|
+
<tr><td>Perplexity</td><td><code>PERPLEXITY_API_KEY</code></td><td>—</td><td>Sonar Huge Online. No tool calling support.</td></tr>
|
|
47
|
+
<tr><td>Cerebras</td><td><code>CEREBRAS_API_KEY</code></td><td>—</td><td>Wafer-Scale Engine. Extremely fast inference. Qwen 3 235B.</td></tr>
|
|
48
|
+
<tr><td>SiliconFlow</td><td><code>SILICONFLOW_API_KEY</code></td><td>—</td><td>China-based AI platform. DeepSeek V4 Pro and Flash.</td></tr>
|
|
49
|
+
<tr><td>Moonshot AI (Kimi)</td><td><code>MOONSHOT_API_KEY</code></td><td>kimi-latest</td><td>Kimi models. 128K context. Vision and tool calling.</td></tr>
|
|
50
|
+
<tr><td>Zhipu AI (GLM)</td><td><code>ZHIPU_API_KEY</code></td><td>glm-4</td><td>GLM-4 model. 128K context.</td></tr>
|
|
51
|
+
<tr><td>Hugging Face</td><td><code>HUGGINGFACE_API_KEY</code></td><td>—</td><td>Inference API. Llama 3.1 70B. No tool calling.</td></tr>
|
|
52
|
+
<tr><td>Poe</td><td><code>POE_API_KEY</code></td><td>—</td><td>OpenAI-compatible gateway. Claude 3.7 Sonnet available.</td></tr>
|
|
53
|
+
<tr><td>DigitalOcean</td><td><code>DIGITALOCEAN_API_KEY</code></td><td>—</td><td>Serverless Inference. Llama 3.1 70B.</td></tr>
|
|
54
|
+
</table>
|
|
55
|
+
|
|
56
|
+
<h2>Provider Selection</h2>
|
|
57
|
+
<p>ProviderManager resolves the active provider by:</p>
|
|
58
|
+
<ol>
|
|
59
|
+
<li>Scanning environment variables for configured API keys</li>
|
|
60
|
+
<li>Loading provider metadata from <code>providers.json</code></li>
|
|
61
|
+
<li>Resolving model names to provider-specific identifiers</li>
|
|
62
|
+
<li>Applying the adapter layer for non-Anthropic providers</li>
|
|
63
|
+
<li>Handling config migration and backward compatibility</li>
|
|
64
|
+
</ol>
|
|
65
|
+
|
|
66
|
+
<h2>Adapter Layer</h2>
|
|
67
|
+
<p>Non-Anthropic providers pass through adapters that normalize:</p>
|
|
68
|
+
<ul>
|
|
69
|
+
<li><strong>Content blocks</strong> — text, tool_use, tool_result, thinking block conversion (<code>contentBlockUtils.ts</code>)</li>
|
|
70
|
+
<li><strong>Tool calls</strong> — parsing across provider formats (<code>toolCallParser.ts</code>)</li>
|
|
71
|
+
<li><strong>Streaming chunks</strong> — per-chunk normalization for real-time display</li>
|
|
72
|
+
<li><strong>Errors</strong> — normalization with retry/rate-limit handling (<code>errorNormalizer.ts</code>)</li>
|
|
73
|
+
<li><strong>Usage</strong> — token counting and cost estimation (<code>usageNormalizer.ts</code>)</li>
|
|
74
|
+
</ul>
|
|
75
|
+
|
|
76
|
+
<h2>Runtime Switching</h2>
|
|
77
|
+
<pre><code>/model # Interactive model picker
|
|
78
|
+
/model list # List all available models across providers
|
|
79
|
+
/model claude-sonnet-4-7 # Switch to a specific model
|
|
80
|
+
/provider-select # Show or change active provider</code></pre>
|
|
81
|
+
|
|
82
|
+
<h2>Provider Capabilities</h2>
|
|
83
|
+
<p>Each provider declares capabilities in <code>providers.json</code>:</p>
|
|
84
|
+
<ul>
|
|
85
|
+
<li><strong>chat</strong> — Chat completion endpoint</li>
|
|
86
|
+
<li><strong>streaming</strong> — full, partial, or none</li>
|
|
87
|
+
<li><strong>toolCalling</strong> — native, adapted, or none</li>
|
|
88
|
+
<li><strong>vision</strong> — Image input support</li>
|
|
89
|
+
<li><strong>jsonSchema</strong> — Structured output via JSON schema</li>
|
|
90
|
+
<li><strong>reasoningEffort</strong> — Configurable reasoning depth</li>
|
|
91
|
+
<li><strong>contextLength</strong> — Maximum context window size</li>
|
|
92
|
+
</ul>
|
|
93
|
+
|
|
94
|
+
<h2>Local / Offline Development</h2>
|
|
95
|
+
<pre><code># Ollama — fully offline
|
|
96
|
+
export OLLAMA_API_KEY=ollama # (any non-empty value)
|
|
97
|
+
export OLLAMA_HOST=http://localhost:11434
|
|
98
|
+
clew
|
|
99
|
+
> /model ollama/llama4:70b
|
|
100
|
+
|
|
101
|
+
# Debug specific provider
|
|
102
|
+
DEBUG=provider:anthropic clew</code></pre>
|
|
103
|
+
|
|
104
|
+
<footer class="footer">
|
|
105
|
+
<span>Clew Code v0.2.7 — Open Source</span>
|
|
106
|
+
<div class="footer-links">
|
|
107
|
+
<a href="https://github.com/ClewCode/ClewCode">GitHub</a>
|
|
108
|
+
<a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
|
|
109
|
+
</div>
|
|
110
|
+
</footer>
|
|
111
|
+
</main>
|
|
112
|
+
<nav class="toc-sidebar"></nav>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<script src="js/main.js"></script>
|
|
116
|
+
</body>
|
|
117
|
+
</html>
|
|
118
|
+
/footer>
|
|
119
|
+
</main>
|
|
120
|
+
<nav class="toc-sidebar"></nav>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<script src="js/main.js"></script>
|
|
124
|
+
</body>
|
|
125
|
+
</html>
|
|
126
|
+
|