Repository navigation
KI: dritter Anbieter „OpenAI-kompatibel“ (Ollama, LM Studio, OpenAI, OpenRouter, Qwen) - #3
Merged
Merged
Conversation
…OpenRouter, Qwen) core/ki baut weiter Messages-API-Bodys; der Transport übersetzt nach Chat Completions und zurück (core/ki/openai.ts). Der Rust-Kern schickt an /chat/completions mit optionalem Bearer-Schlüssel (Konto „openai-kompatibel“, http nur für localhost, Zeitlimit 30 min). - Vorlagen mit Standard-URL, Antwortformat (json_schema bzw. json_object) und Effort-Übergabe; Modelle ohne Claude-Standard, leere Rolle = Prüfmodell - optionale Kontextlänge: zu große Anfragen werden vorher abgelehnt statt still gekürzt - kein count_tokens (Schätzung), keine Listenpreise (Kosten „keine Angabe“, Ablagen ohne kostenUsd) - Einstellungsdialog mit Dienst, Basis-URL, Modellen, Kontextlänge - Entscheidung E15 in docs/architektur.md, Details in core/ki/README.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Leon Machnik <98738343+leonatwork@users.noreply.github.com>
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Worum es geht
Neben Foundry und der Claude API kann Plotwerk jetzt jeden Dienst mit OpenAI-kompatibler Chat-Completions-API nutzen: lokal (Ollama, LM Studio) oder in der Cloud (OpenAI, OpenRouter, Qwen/Alibaba Cloud, eigene URL). Entscheidung E15 in
docs/architektur.md.Wie
core/ki/openai.ts: übersetzt Messages-API ⇄ Chat Completions. Prompt, Allowlist (E12), Zitatprüfung (E6) und Antwortprüfung bleiben unverändert. Das Schema geht alsresponse_format(json_schema strict, bei Qwen json_object mit Schema im Prompt).<think>-Blöcke und ```-Zäune werden vor dem JSON entfernt.src/backend/tauri/kiTransport.ts): Übersetzung, Prüfung auf ein eingetragenes Modell, Ablehnung zu großer Anfragen bei gesetzter Kontextlänge (statt still gekürztem Buch). Keincount_tokens→ Schätzung.plotwerk-ki):Anbieter::OpenAi→{endpoint}/chat/completions,Authorization: Bearernur wenn ein Schlüssel hinterlegt ist (Kontoopenai-kompatibel),http://nur für localhost, Zeitlimit 30 min.KiAnbieter+'openai',ki.openai{vorlage, endpoint, modelle, kontextTokens?}. Beim Umschalten geht nichts verloren.kostenUsd.Tests
npm test: 1105 Tests grün,npm run typechecksauberprojekt.mdcargo test,cargo clippy,cargo fmt --checksauber; neue HTTP-Tests für/chat/completionsOffen
require_parameters,data_collection: "deny")🤖 Generated with Claude Code