fix(ollama): use apiKey auth mode to avoid streamSimple crash
This commit is contained in:
parent
092d1c0a9e
commit
352dd17e76
1 changed files with 6 additions and 1 deletions
|
|
@ -70,8 +70,13 @@ async function probeAndRegister(pi: ExtensionAPI): Promise<boolean> {
|
|||
|
||||
const baseUrl = getOllamaOpenAIBaseUrl();
|
||||
|
||||
// Use authMode "apiKey" with a dummy key (#3440).
|
||||
// authMode "none" requires a custom streamSimple handler, but Ollama uses
|
||||
// the standard OpenAI-compatible streaming endpoint. Ollama ignores the
|
||||
// Authorization header so the dummy key is harmless.
|
||||
pi.registerProvider("ollama", {
|
||||
authMode: "none",
|
||||
authMode: "apiKey",
|
||||
apiKey: "ollama",
|
||||
baseUrl,
|
||||
api: "openai-completions",
|
||||
isReady: () => true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue