diff --git a/core/llm/index.ts b/core/llm/index.ts index ed920eaa7..6831ad475 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -52,7 +52,8 @@ export abstract class BaseLLM implements ILLM { if (this.providerName === "openai") { if ( this.apiBase?.includes("api.groq.com") || - this.apiBase?.includes(":1337") + this.apiBase?.includes(":1337") || + this._llmOptions.useLegacyCompletionsEndpoint?.valueOf() === false ) { // Jan + Groq don't support completions : ( return false; diff --git a/docs/docs/reference/Model Providers/openai.md b/docs/docs/reference/Model Providers/openai.md index 853d97b43..c15f88b63 100644 --- a/docs/docs/reference/Model Providers/openai.md +++ b/docs/docs/reference/Model Providers/openai.md @@ -52,4 +52,10 @@ If you are [using an OpenAI compatible server / API](../../model-setup/select-pr } ``` +To force usage of `chat/completions` instead of `completions` endpoint you can set + +```json +"useLegacyCompletionsEndpoint": false +``` + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/OpenAI.ts)