feat: OpenAI-kompatible API mit Keys, Registry und serve-Befehl (M2.3)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 17:27:46 +01:00
parent ada5745c53
commit 4d53d5afa3
35 changed files with 3434 additions and 21 deletions

11
tests/sdk/README.md Normal file
View File

@ -0,0 +1,11 @@
# SDK-Tests
Das offizielle OpenAI-Python-SDK gegen ein echtes `nexus serve`. Statt einer Engine läuft die Attrappe `crates/nexus-adapter/tests/fake_llama_server.py`. Ein grüner Lauf heißt „die API verhält sich für das SDK wie gebaut“, nicht „echte Modelle laufen“.
```bash
python3 -m venv .venv && .venv/bin/pip install openai # einmalig, .venv ist nicht eingecheckt
cargo build -p nexus
.venv/bin/python -m unittest discover -s tests/sdk -v
```
`NEXUS_BIN` überschreibt den Pfad des Binarys. Geprüft: Modellliste ohne Laden, Abruf, Chat mit automatischem Modellstart, Streaming, falscher Key (401), unbekanntes Modell (404), unerlaubte Priorität (403), sauberes Herunterfahren (Exit 0, Instanz beendet).