Skip to content

Commit 0d251c1

Browse files
committed
feat: provider 扩展 (Azure/GitLab/Copilot Enterprise) + README 12 语言
Provider 代码: - ProfileConfig 添加 query_params 支持 (Azure api-version 等) - Azure OpenAI 自动检测 api-key header 认证 - GitLab Duo provider (GITLAB_TOKEN/GL_TOKEN 环境变量) - GitHub Copilot Enterprise --enterprise-url 参数 - read_copilot_config_with_host() 支持 GHE apps.json 搜索 config.example.toml: - 新增 Azure OpenAI, Vertex AI, GitLab Duo, Groq, Mistral, Together AI, Perplexity, Cerebras, LM Studio, Bedrock 示例 README: - 重写英文 README (更新架构树、provider 兼容表、CLI 命令表) - 12 语言版本: en, zh-CN, zh-TW, ja, ko, ru, fr, pt-BR, es, it, de, pl
1 parent b300faf commit 0d251c1

23 files changed

Lines changed: 3634 additions & 216 deletions

README.de.md

Lines changed: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
1+
<p align="center">
2+
<h1 align="center">Claudex</h1>
3+
<p align="center">Multi-Instanz Claude Code Manager mit intelligentem Übersetzungsproxy</p>
4+
</p>
5+
6+
<p align="center">
7+
<a href="https://github.com/StringKe/claudex/actions/workflows/ci.yml"><img src="https://github.com/StringKe/claudex/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
8+
<a href="https://github.com/StringKe/claudex/releases"><img src="https://github.com/StringKe/claudex/actions/workflows/release.yml/badge.svg" alt="Release"></a>
9+
<a href="https://github.com/StringKe/claudex/blob/main/LICENSE"><img src="https://img.shields.io/github/license/StringKe/claudex" alt="Lizenz"></a>
10+
<a href="https://github.com/StringKe/claudex/releases"><img src="https://img.shields.io/github/v/release/StringKe/claudex" alt="Neueste Version"></a>
11+
</p>
12+
13+
<p align="center">
14+
<a href="https://stringke.github.io/claudex/de/">Dokumentation</a>
15+
</p>
16+
17+
<p align="center">
18+
<a href="./README.md">English</a> |
19+
<a href="./README.zh-CN.md">简体中文</a> |
20+
<a href="./README.zh-TW.md">繁體中文</a> |
21+
<a href="./README.ja.md">日本語</a> |
22+
<a href="./README.ko.md">한국어</a> |
23+
<a href="./README.ru.md">Русский</a> |
24+
<a href="./README.fr.md">Français</a> |
25+
<a href="./README.pt-BR.md">Português do Brasil</a> |
26+
<a href="./README.es.md">Español</a> |
27+
<a href="./README.it.md">Italiano</a> |
28+
Deutsch |
29+
<a href="./README.pl.md">Polski</a>
30+
</p>
31+
32+
---
33+
34+
Claudex ist ein einheitlicher Proxy, der es [Claude Code](https://docs.anthropic.com/en/docs/claude-code) ermöglicht, durch automatische Protokollübersetzung nahtlos mit mehreren KI-Anbietern zusammenzuarbeiten.
35+
36+
## Funktionen
37+
38+
- **Multi-Anbieter-Proxy** — DirectAnthropic-Durchleitung + Anthropic <-> OpenAI Chat Completions Übersetzung + Anthropic <-> Responses API Übersetzung
39+
- **20+ Anbieter** — Anthropic, OpenRouter, Grok, OpenAI, DeepSeek, Kimi, GLM, Groq, Mistral, Together AI, Perplexity, Cerebras, Azure OpenAI, Google Vertex AI, Ollama, LM Studio und weitere
40+
- **Streaming-Übersetzung** — Vollständige SSE-Stream-Übersetzung mit Tool-Call-Unterstützung
41+
- **Circuit Breaker + Failover** — Automatischer Fallback zu Backup-Anbietern mit konfigurierbaren Schwellenwerten
42+
- **Intelligentes Routing** — Absichtsbasiertes automatisches Routing über lokalen Klassifikator
43+
- **Kontext-Engine** — Gesprächskomprimierung, profilübergreifende Weitergabe, lokales RAG mit Einbettungen
44+
- **OAuth-Abonnements** — ChatGPT/Codex, Claude Max, GitHub Copilot, GitLab Duo, Google Gemini, Qwen, Kimi
45+
- **Konfigurationssets** — Wiederverwendbare Claude Code Konfigurationssets aus Git-Repos installieren und verwalten
46+
- **TUI-Dashboard** — Echtzeit-Profilzustand, Metriken, Protokolle und Schnellstart
47+
- **Selbst-Update**`claudex update` lädt die neueste Version von GitHub herunter
48+
49+
## Installation
50+
51+
```bash
52+
# Einzeiler (Linux / macOS)
53+
curl -fsSL https://raw.githubusercontent.com/StringKe/claudex/main/install.sh | bash
54+
55+
# Aus dem Quellcode
56+
cargo install --git https://github.com/StringKe/claudex
57+
58+
# Oder von GitHub Releases herunterladen
59+
# https://github.com/StringKe/claudex/releases
60+
```
61+
62+
### Systemanforderungen
63+
64+
- macOS (Intel / Apple Silicon) oder Linux (x86_64 / ARM64)
65+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installiert
66+
- Windows: vorkompilierte Binärdatei von [Releases](https://github.com/StringKe/claudex/releases) herunterladen
67+
68+
## Schnellstart
69+
70+
```bash
71+
# 1. Konfiguration initialisieren
72+
claudex config init
73+
74+
# 2. Interaktiv ein Anbieterprofil hinzufügen
75+
claudex profile add
76+
77+
# 3. Konnektivität testen
78+
claudex profile test all
79+
80+
# 4. Claude Code mit einem bestimmten Anbieter starten
81+
claudex run grok
82+
83+
# 5. Oder intelligentes Routing nutzen, um den besten Anbieter automatisch auszuwählen
84+
claudex run auto
85+
```
86+
87+
## Funktionsweise
88+
89+
```
90+
claudex run openrouter-claude
91+
92+
├── Proxy starten (falls nicht aktiv) → 127.0.0.1:13456
93+
94+
└── claude ausführen mit Umgebungsvariablen:
95+
ANTHROPIC_BASE_URL=http://127.0.0.1:13456/proxy/openrouter-claude
96+
ANTHROPIC_AUTH_TOKEN=claudex-passthrough
97+
ANTHROPIC_MODEL=anthropic/claude-sonnet-4
98+
ANTHROPIC_DEFAULT_HAIKU_MODEL=...
99+
ANTHROPIC_DEFAULT_SONNET_MODEL=...
100+
ANTHROPIC_DEFAULT_OPUS_MODEL=...
101+
```
102+
103+
Der Proxy fängt Anfragen ab und übernimmt die Protokollübersetzung:
104+
105+
- **DirectAnthropic** (Anthropic, MiniMax, Vertex AI) → Weiterleitung mit korrekten Headern
106+
- **OpenAICompatible** (Grok, OpenAI, DeepSeek, etc.) → Anthropic → OpenAI Chat Completions → Antwort zurück übersetzen
107+
- **OpenAIResponses** (ChatGPT/Codex-Abonnements) → Anthropic → Responses API → Antwort zurück übersetzen
108+
109+
## Anbieterkompatibilität
110+
111+
| Anbieter | Typ | Übersetzung | Authentifizierung | Beispielmodell |
112+
|----------|-----|-------------|-------------------|----------------|
113+
| Anthropic | DirectAnthropic | Keine | API Key | `claude-sonnet-4-20250514` |
114+
| MiniMax | DirectAnthropic | Keine | API Key | `claude-sonnet-4-20250514` |
115+
| OpenRouter | OpenAICompatible | Anthropic <-> OpenAI | API Key | `anthropic/claude-sonnet-4` |
116+
| Grok (xAI) | OpenAICompatible | Anthropic <-> OpenAI | API Key | `grok-3-beta` |
117+
| OpenAI | OpenAICompatible | Anthropic <-> OpenAI | API Key | `gpt-4o` |
118+
| DeepSeek | OpenAICompatible | Anthropic <-> OpenAI | API Key | `deepseek-chat` |
119+
| Kimi | OpenAICompatible | Anthropic <-> OpenAI | API Key | `kimi-k2-0905-preview` |
120+
| GLM (Zhipu) | OpenAICompatible | Anthropic <-> OpenAI | API Key | `glm-4-plus` |
121+
| Groq | OpenAICompatible | Anthropic <-> OpenAI | API Key | `llama-3.3-70b` |
122+
| Mistral | OpenAICompatible | Anthropic <-> OpenAI | API Key | `mistral-large-latest` |
123+
| Together AI | OpenAICompatible | Anthropic <-> OpenAI | API Key | `meta-llama/...` |
124+
| Perplexity | OpenAICompatible | Anthropic <-> OpenAI | API Key | `sonar-pro` |
125+
| Cerebras | OpenAICompatible | Anthropic <-> OpenAI | API Key | `llama-3.3-70b` |
126+
| Azure OpenAI | OpenAICompatible | Anthropic <-> OpenAI | api-key Header | `gpt-4o` |
127+
| Google Vertex AI | DirectAnthropic | Keine | Bearer (gcloud) | `claude-sonnet-4@...` |
128+
| Ollama | OpenAICompatible | Anthropic <-> OpenAI | Keine | `qwen2.5:72b` |
129+
| LM Studio | OpenAICompatible | Anthropic <-> OpenAI | Keine | lokales Modell |
130+
| ChatGPT/Codex-Abo | OpenAIResponses | Anthropic <-> Responses | OAuth (PKCE/Device) | `gpt-5.3-codex` |
131+
| Claude Max-Abo | DirectAnthropic | Keine | OAuth (Datei) | `claude-sonnet-4` |
132+
| GitHub Copilot | OpenAICompatible | Anthropic <-> OpenAI | OAuth (Device+Bearer) | `gpt-4o` |
133+
| GitLab Duo | OpenAICompatible | Anthropic <-> OpenAI | GITLAB_TOKEN | `claude-sonnet-4` |
134+
135+
## Konfiguration
136+
137+
Claudex sucht Konfigurationsdateien in dieser Reihenfolge:
138+
139+
1. Umgebungsvariable `$CLAUDEX_CONFIG`
140+
2. `./claudex.toml` oder `./claudex.yaml` (aktuelles Verzeichnis)
141+
3. `./.claudex/config.toml`
142+
4. Übergeordnete Verzeichnisse (bis zu 10 Ebenen)
143+
5. `~/.config/claudex/config.toml` (global, empfohlen)
144+
145+
Unterstützt TOML- und YAML-Format. Vollständige Referenz in [`config.example.toml`](./config.example.toml).
146+
147+
## CLI-Referenz
148+
149+
| Befehl | Beschreibung |
150+
|--------|--------------|
151+
| `claudex run <profile>` | Claude Code mit einem bestimmten Anbieter starten |
152+
| `claudex run auto` | Intelligentes Routing — besten Anbieter automatisch auswählen |
153+
| `claudex run <profile> -m <model>` | Modell für eine Sitzung überschreiben |
154+
| `claudex profile list` | Alle konfigurierten Profile auflisten |
155+
| `claudex profile add` | Interaktiver Profil-Einrichtungsassistent |
156+
| `claudex profile show <name>` | Profildetails anzeigen |
157+
| `claudex profile remove <name>` | Profil entfernen |
158+
| `claudex profile test <name\|all>` | Anbieterkonnektivität testen |
159+
| `claudex proxy start [-p port] [-d]` | Proxy starten (optional als Daemon) |
160+
| `claudex proxy stop` | Proxy-Daemon stoppen |
161+
| `claudex proxy status` | Proxy-Status anzeigen |
162+
| `claudex dashboard` | TUI-Dashboard starten |
163+
| `claudex config show [--raw] [--json]` | Geladene Konfiguration anzeigen |
164+
| `claudex config init [--yaml]` | Konfiguration im aktuellen Verzeichnis erstellen |
165+
| `claudex config edit [--global]` | Konfiguration in $EDITOR öffnen |
166+
| `claudex config validate [--connectivity]` | Konfiguration validieren |
167+
| `claudex config get <key>` | Konfigurationswert abrufen |
168+
| `claudex config set <key> <value>` | Konfigurationswert setzen |
169+
| `claudex config export --format <fmt>` | Konfiguration exportieren (json/toml/yaml) |
170+
| `claudex update [--check]` | Selbst-Update von GitHub Releases |
171+
| `claudex auth login <provider>` | OAuth-Anmeldung |
172+
| `claudex auth login github --enterprise-url <domain>` | GitHub Enterprise Copilot |
173+
| `claudex auth status` | OAuth-Token-Status anzeigen |
174+
| `claudex auth logout <profile>` | OAuth-Token entfernen |
175+
| `claudex auth refresh <profile>` | OAuth-Token zwangsweise erneuern |
176+
| `claudex sets add <source> [--global]` | Konfigurationsset installieren |
177+
| `claudex sets remove <name>` | Konfigurationsset entfernen |
178+
| `claudex sets list [--global]` | Installierte Sets auflisten |
179+
| `claudex sets update [name]` | Sets auf den neuesten Stand bringen |
180+
181+
## OAuth-Abonnements
182+
183+
Vorhandene Abonnements statt API-Schlüssel verwenden:
184+
185+
```bash
186+
# ChatGPT-Abonnement (erkennt vorhandene Codex CLI-Zugangsdaten automatisch)
187+
claudex auth login chatgpt --profile codex-sub
188+
189+
# ChatGPT Browser-Anmeldung erzwingen
190+
claudex auth login chatgpt --profile codex-sub --force
191+
192+
# ChatGPT headless (SSH/kein Browser)
193+
claudex auth login chatgpt --profile codex-sub --force --headless
194+
195+
# GitHub Copilot
196+
claudex auth login github --profile copilot
197+
198+
# GitHub Copilot Enterprise
199+
claudex auth login github --profile copilot-ent --enterprise-url company.ghe.com
200+
201+
# GitLab Duo (liest GITLAB_TOKEN-Umgebungsvariable)
202+
claudex auth login gitlab --profile gitlab-duo
203+
204+
# Status prüfen
205+
claudex auth status
206+
207+
# Mit Abonnement starten
208+
claudex run codex-sub
209+
```
210+
211+
Unterstützt: `claude`, `chatgpt`/`openai`, `google`, `qwen`, `kimi`, `github`/`copilot`, `gitlab`
212+
213+
## Modell-Slot-Zuordnung
214+
215+
Den `/model`-Umschalter von Claude Code (haiku/sonnet/opus) den Modellen beliebiger Anbieter zuordnen:
216+
217+
```toml
218+
[[profiles]]
219+
name = "openrouter-deepseek"
220+
provider_type = "OpenAICompatible"
221+
base_url = "https://openrouter.ai/api/v1"
222+
api_key = "sk-or-..."
223+
default_model = "deepseek/deepseek-chat-v3-0324"
224+
225+
[profiles.models]
226+
haiku = "deepseek/deepseek-chat-v3-0324"
227+
sonnet = "deepseek/deepseek-chat-v3-0324"
228+
opus = "deepseek/deepseek-r1"
229+
```
230+
231+
## Architektur
232+
233+
```
234+
src/
235+
├── main.rs
236+
├── cli.rs
237+
├── update.rs
238+
├── util.rs
239+
├── config/
240+
│ ├── mod.rs # Konfigurationssuche + Parsing (figment)
241+
│ ├── cmd.rs # config get/set/export/validate Unterbefehle
242+
│ └── profile.rs # Profil-CRUD + Konnektivitätstest
243+
├── process/
244+
│ ├── mod.rs
245+
│ ├── launch.rs # Claude-Prozessstarter
246+
│ └── daemon.rs # PID-Datei + Prozessverwaltung
247+
├── oauth/
248+
│ ├── mod.rs # AuthType, OAuthProvider, OAuthToken
249+
│ ├── source.rs # Ebene 1: Zugangsdatenquellen (env/file/keyring)
250+
│ ├── exchange.rs # Ebene 2: Token-Austausch (PKCE/device code/refresh)
251+
│ ├── manager.rs # Ebene 3: Cache + parallele Deduplizierung + 401-Wiederholung
252+
│ ├── handler.rs # OAuthProviderHandler-Trait
253+
│ ├── providers.rs # Anmelde-/Aktualisierungs-/Status-CLI-Logik
254+
│ ├── server.rs # OAuth-Callback-Server + Device-Code-Polling
255+
│ └── token.rs # Re-Exporte
256+
├── proxy/
257+
│ ├── mod.rs # Axum-Server + ProxyState
258+
│ ├── handler.rs # Anfrage-Routing + Circuit Breaker + 401-Wiederholung
259+
│ ├── adapter/ # Anbieterspezifische Adapter
260+
│ │ ├── mod.rs # ProviderAdapter-Trait + Factory
261+
│ │ ├── direct.rs # DirectAnthropic (Durchleitung)
262+
│ │ ├── chat_completions.rs # OpenAI Chat Completions
263+
│ │ └── responses.rs # OpenAI Responses API
264+
│ ├── translate/ # Protokollübersetzung
265+
│ │ ├── chat_completions.rs
266+
│ │ ├── chat_completions_stream.rs
267+
│ │ ├── responses.rs
268+
│ │ └── responses_stream.rs
269+
│ ├── context_engine.rs
270+
│ ├── fallback.rs # Circuit Breaker
271+
│ ├── health.rs
272+
│ ├── metrics.rs
273+
│ ├── models.rs
274+
│ ├── error.rs
275+
│ └── util.rs
276+
├── router/
277+
│ ├── mod.rs
278+
│ └── classifier.rs
279+
├── context/
280+
│ ├── mod.rs
281+
│ ├── compression.rs
282+
│ ├── sharing.rs
283+
│ └── rag.rs
284+
├── sets/ # Verwaltung von Konfigurationssets
285+
│ ├── mod.rs
286+
│ ├── schema.rs
287+
│ ├── source.rs
288+
│ ├── install.rs
289+
│ ├── lock.rs
290+
│ ├── conflict.rs
291+
│ └── mcp.rs
292+
├── terminal/ # Terminal-Erkennung + Hyperlinks
293+
│ ├── mod.rs
294+
│ ├── detect.rs
295+
│ ├── osc8.rs
296+
│ └── pty.rs
297+
└── tui/
298+
├── mod.rs
299+
├── dashboard.rs
300+
├── input.rs
301+
└── widgets.rs
302+
```
303+
304+
## Lizenz
305+
306+
[MIT](./LICENSE)

0 commit comments

Comments
 (0)