plandex icon indicating copy to clipboard operation
plandex copied to clipboard

Wrong HTTP Verb (GET) when OpenAI API URL ends with /

Open schniggie opened this issue 7 months ago • 0 comments

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.

schniggie avatar Jul 14 '24 20:07 schniggie