plandex
plandex copied to clipboard
Wrong HTTP Verb (GET) when OpenAI API URL ends with /
I run into the following issue, which feels like a bug. When adding a custom provider/model, eg. ollama, the OpenAI API url MUST NOT end with a /. If the URL ends with a /, plandex-server will try to communicate wth a GET request, which will fail on OpenAPI-comptabile APIs.
Example:
API: http://localhost:11434/v1/ Results in GET http://localhost:11434/v1/v1/chat/completions and this gives a 404
API: http://localhost:11434/v1 Results in POST http://localhost:11434/v1/v1/chat/completions and this works as expected.