You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li>Adapt format differences between Providers</li>
87
113
</ul>
88
114
115
+
<h2>Failover</h2>
116
+
<p>Configure multiple mapping rules for the same client model, all with Failover strategy. Router tries Providers in configured order, auto-switching on failure:</p>
Provider A fails → Exclude A → Provider B fails → Exclude B<br>
120
+
→ Provider C succeeds → Return response<br>
121
+
→ All failed → Return last error
122
+
</code>
123
+
</div>
124
+
<p>Typical scenario: Primary provider (e.g. Zhipu) hits rate limit → auto-switch to backup (e.g. Moonshot), returns to primary when recovered.</p>
125
+
89
126
<h2>Visual Pipeline Editor</h2>
90
127
<p>The <strong>MappingEntryEditor</strong> component renders a single mapping chain as a vertical pipeline: Client Model → Match Rule → Backend Model → Provider — clear at a glance.</p>
<p>Each model under a Provider supports a custom <code>stream_timeout_ms</code> (streaming response timeout). On timeout the Router returns a 408 error. Timeout badges are displayed on the mapping config page. See <router-linkto="/project/llm-simple-router/guide/features/model-mapping">Model Mapping</router-link>.</p>
67
73
68
74
<h2>Network Proxy</h2>
69
-
<p>Per-Provider SOCKS5/HTTPS proxy configuration. Set proxy type, host, port, and authentication in the Provider edit dialog. See <router-linkto="/project/llm-simple-router/guide/features/proxy">Network Proxy</router-link>.</p>
75
+
<p>Per-Provider SOCKS5/HTTPS proxy — configure in the Provider edit dialog:</p>
76
+
<ul>
77
+
<li><strong>Proxy Type</strong>: SOCKS5 or HTTPS</li>
78
+
<li><strong>Host / Port</strong>: Proxy server address</li>
79
+
<li><strong>Authentication</strong>: Username and password (optional)</li>
80
+
</ul>
81
+
<p>Use cases: corporate networks requiring proxy for external APIs, or region-restricted API access via SOCKS5.</p>
70
82
71
83
<h2>Concurrency Control</h2>
72
84
<p>Each Provider can have independent concurrency limits with fixed or adaptive modes. See <router-linkto="/project/llm-simple-router/guide/features/concurrency">Concurrency Control</router-link>.</p>
After starting, visit <code>http://localhost:9981/admin</code> and set up an admin password on first access. Data is stored in <code>~/.llm-simple-router/</code>.
58
-
</p>
59
-
60
-
<h2>2. Add a Provider</h2>
61
-
<p>
62
-
Admin Panel > Provider page > Add Provider. Selecting a Coding Plan auto-fills the Base URL — just enter your API Key.
63
-
</p>
64
-
65
-
<h2>3. Configure Model Mapping</h2>
66
-
<p>
67
-
Core concept: the client sends a request with model name A. Router replaces it with model name B supported by the backend Provider, then forwards the request:
68
-
</p>
88
+
<h1>Getting Started</h1>
89
+
<pclass="text-lg text-gray-400">6 steps to route Claude Code through Router.</p>
<p>After starting, visit <code>http://localhost:9981/admin</code>. First access goes to the Setup page to set an admin password. Data is stored in <code>~/.llm-simple-router/</code>.</p>
94
+
<ScreenShotsrc="/images/llm-simple-router/dashboard.png"caption="Dashboard after Setup" />
95
+
96
+
<h2>Step 2: Add a Provider</h2>
97
+
<p>Admin Panel → <strong>Provider</strong> page → Add Provider. Select a Coding Plan to auto-fill Base URL and context window — just enter your API Key.</p>
Claude Code (Model A) → Router (A → B) → Provider API (Model B)
72
-
</code>
104
+
<codeclass="text-sm font-mono text-gray-300">Claude Code (Model A) → Router (A → B) → Provider API (Model B)</code>
73
105
</div>
74
-
75
-
<p>When Claude Code has no environment variable set, it defaults to model names <code>opus</code>, <code>sonnet</code>, <code>haiku</code>. A typical mapping config:</p>
106
+
<p>Claude Code defaults to model names <code>opus</code>, <code>sonnet</code>, <code>haiku</code>. A typical config:</p>
<p>Create a Router API key in the admin panel, then choose one setup method. See the <router-linkto="/project/llm-simple-router/guide/config/claude-code">Claude Code Setup</router-link> page for details.</p>
117
+
<h2>Step 4: Set Concurrency Limits</h2>
118
+
<p>On the Provider page, set max concurrency per provider. Suggested: Zhipu Coding Plan 5, others per their API limits. Enable adaptive mode for auto-optimization.</p>
89
119
90
-
<h2>5. Start Using</h2>
91
-
</template>
120
+
<h2>Step 5: Configure Claude Code</h2>
121
+
<p>Create a Router API key in Admin Panel (<code>sk-router-xxx</code>), then choose one method:</p>
122
+
123
+
<h3>Method 1: Shell Alias (Recommended)</h3>
124
+
<p>Add to <code>~/.zshrc</code> or <code>~/.bashrc</code>:</p>
125
+
<CodeBlock:code="shellAliasEn"language="bash" />
126
+
127
+
<h3>Method 2: settings.json</h3>
128
+
<p>Add to <code>~/.claude/settings.json</code>:</p>
<p>See <router-linkto="/project/llm-simple-router/guide/config/claude-code">Claude Code Setup</router-link> for details.</p>
132
+
133
+
<h2>Step 6: Verify</h2>
134
+
<p>Start Claude Code (use <code>clode</code> if you set up the alias), send a message. Check the <router-linkto="/project/llm-simple-router/guide/features/monitor">Live Monitor</router-link> page for the request.</p>
135
+
<p>If issues arise, check the <router-linkto="/project/llm-simple-router/guide/faq">FAQ</router-link>.</p>
0 commit comments