How to setup plandex to use ollama. #248
Unanswered
SkybuckFlying
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Tried to add new model with proper url, but custom provider still requires API key, though ollama does not require api key, empty not possible, AI suggested setting it to "dummy-key" Resulting in: ⚡️ \tell ⚡️ Tell mode is enabled ⚡️ hello 🚨 dummy-key environment variable is not set. ⚡️ \help |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is my "technical" situation:
Windows 11 runs:
PostgreSQL on port 5432
Windows 11 runs:
Linux Ubuntu 24.0.4 via WSL (Windows subsystem for Linux)
The IP addresses are a bit confusing but so far everything seems to work thanks to co-pilot AI with firewall rules etc.
Linux ubuntu 24.04 inside WSL has been setup to store the plandex executable.
To store the IP address to the postgresql server automatically the following script runs on linux:
/home/skybuck/update_wsl_ip.sh:
modification was made to allow this to run at start of wsl session from ~/.bashrc script:
add line via:
The /~.bashrc file looks as follows, it will only run in interactive bash session, running bash commands directly from windows shortcuts did not work, so first cmd.exe must be started, then wsl command must be entered to enter wsl system:
some details will be removed like api keys and password, instead and will be inserted to illustrate the concept:
/home/skybuck/.bashrc:
Windows firewall rule from powershell, may have to be re-applied after PC reboot, for PostgreSQLServer:
Windows firewall rule from powershell, may have to be re-applied after PC reboot, for Ollama:
Test postgresql from powershell or wsl:
psql DATABASE_URL
or
psql -h -U <your_username> -d <your_database or plandex>
Test ollama from WSL:
curl -X POST http://192.168.178.10:11434/api/generate -d '{ "model": "cogito:14b", "prompt": "Hello!" }' -H "Content-Type: application/json"or
curl http://192.168.178.10:11434/api/tagsping command can also be usefull to see if things are reachable.
To start ollama so it will accept connections from beyond localhost and from wsl/external:
$env:OLLAMA_HOST="192.168.178.10"
ollama serve
ipconfig can be used to find the ip address of windows this was necessary.
Apperently wsl can do all kinds of things and all kinds of IP addresses point to same thing.
However localhost keeps pointing to 127.0.0.1 and cannot be used because it's not "cross virtual network".
Anyway my main question is now how to setup the plandex models.
I can now run plandex... I am trying to make it work with the local ollama.
I tried a simple model like cognito:14b just to not type complex model name but plandex cannot connect to it when I try \tell:
💬 User prompt 👇
hello
🚨 Error starting reply stream
→ Status code
→ 404, body: {
"error"
→ {
"message"
→ "The model
cogito:14bdoes not exist or you do not have access to it.","type"
→ "invalid_request_error",
"param"
→ Null,
"code"
→ "model_not_found"
}
}
I tried to setup models myself with custom model pack.
I also loaded this cogito model with ollama run cogito:14b
So far no luck... so some more guidance or built-in model pack examples for ollama would be nice.
I will keep trying to add a new model and maybe more luck with that.
Should openrouter, openai or custom provider be chosen and how to setup custom provider ?
The docs are lacking in this department ?
not sure what to enter for provider:
model name
model id
base url < this could be the cause of problem though
API key environment variable:
max tokens
Default Max Convo Tokens: ›
'Default Max Convo Tokens' is the default maximum size a conversation can reach in the 'planner' role before it is shortened by summarization. For 128k context, ~10000 is recommended. For 200k context, ~15000 is recommended.
✔ Default Max Convo Tokens: … 345
'Max Output Tokens' is the hard limit on output length for the model. Check with the model provider for the recommended value. 8k is a reasonable default if it's not documented, though some models have no max output limit—in that case 'Max Output Tokens' should be set to the same value as 'Max Tokens'.
✔ Max Output Tokens: … 34
'Reserved Output Tokens' is the default number of tokens reserved for model output. This ensures the model has enough tokens to generate a response. It can be lower than the 'Max Output Tokens' limit and should be set to what a realistic output could reach under normal circumstances. If the 'Max Output Tokens' limit is fairly low, just use that. If the 'Max Output Tokens' is very high, or is equal to the 'Max Tokens' input limit, set a lower value so that there's enough room for input. For reasoning models, make sure enough space is included for reasoning tokens.
✔ Reserved Output Tokens: … 234
'Preferred Output Format' is the format for roles needing structured output. Currently, OpenAI models do best with 'Tool Call JSON' and other models generally do better with 'XML'. Choose 'XML' if you're unsure as it offers the widest compatibility. 'Tool Call JSON' requires tool call support and reliable JSON generation.
? Preferred Output Format:
So it needs some more automation maybe for this, automation to add ai models from ollama would be great...
The url above to query ollama could be used for that to see which models are available from ollama...
Beta Was this translation helpful? Give feedback.
All reactions