mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-07 18:27:47 +08:00
fix(ollama): send chat requests to the /api path
The Ollama SDK appends /chat to the base URL, and Ollama serves chat at /api/chat. The model list already added the missing /api, so with "http://localhost:11434" (the address our docs showed) models were listed but every chat request went to /chat and got a 404. An OpenAI-style ".../v1" address went to /v1/chat. ollamaApiUrl() turns the server address, ".../v1" and ".../api" into ".../api". Chat, the model list and the settings dialog's request URL hint all use it. The docs now show http://localhost:11434/api, which also works on released versions.
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@ AI_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0
|
||||
# AZURE_REASONING_SUMMARY=detailed
|
||||
|
||||
# Ollama Configuration (Local or Cloud)
|
||||
# OLLAMA_BASE_URL=https://ollama.com/api # Optional: Ollama Cloud; defaults to local Ollama (http://127.0.0.1:11434)
|
||||
# OLLAMA_BASE_URL=https://ollama.com/api # Optional: Ollama Cloud; defaults to local Ollama (http://127.0.0.1:11434/api)
|
||||
# OLLAMA_API_KEY=your-ollama-cloud-api-key # Optional: For Ollama Cloud or authenticated remote instances
|
||||
# OLLAMA_ENABLE_THINKING=true # Optional: Enable thinking for models that support it (e.g., qwen3)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user