API-Key bei Ollama an die Platform durchreichen - #13
Merged
Conversation
getPlatform() rief OllamaFactory::create() nur mit der Basis-URL auf, obwohl die Factory den Key als zweites Argument annimmt und daraus einen Authorization-Header mit Bearer-Token baut. Ein extern erreichbarer, per Reverse Proxy abgesicherter Ollama-Server ließ sich damit nicht ansprechen; in der Profil-Oberfläche war das Feld für Ollama zusätzlich ausgeblendet. Ein leerer Key bleibt null, dann sendet die Platform keinen Header -- eine ungesicherte lokale Instanz verhält sich unverändert.
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.
Service::getPlatform()gab den API-Key nie anOllamaFactory::create()weiter, obwohl die Factory ihn als zweites Argument annimmt und daraus einenAuthorization: Bearer …-Header baut — ein extern erreichbarer, per Reverse Proxy abgesicherter Ollama-Server war damit nicht ansprechbar. Zusätzlich war das API-Key-Feld inassets/profiles.jsfür Ollama ausgeblendet. Ein leerer Key bleibtnull, dann sendet die Platform keinen Header, eine ungesicherte lokale Instanz verhält sich also unverändert.Verifiziert gegen einen lokalen Server, der die Header protokolliert: mit Key kommt
Authorization: Bearer …auf/api/chatan, ohne Key kein Header (Kontrollprobe).Dieselbe Korrektur steckt auch in #9 — der PR bleibt davon unberührt, sein Ollama-Teil wird beim Rebase nur gegenstandslos.
Dieser Text wurde durch eine KI erstellt.