This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Commit 270aeec
committed
Fix FIM for OpenRouter
FIM was not working with OpenRouter in Continue. The reason
was that we get FIM requests in `/completions`. LiteLLM when
using `acompletion` is forcing `/chat/completions` and the return
format `{..., "choices":[{"delta":{"content":"some text"}}]}`.
However, Continue was expecting the format:
`{..., "choices":[{"text":"some text"}]}` becuase of the endpoint
it called.
With this PR we force the return format to be the latter using
`atext_completion` from LiteLLM1 parent 609ae50 commit 270aeec
File tree
3 files changed
+14
-13
lines changed- src/codegate/providers
- litellmshim
- openai
- openrouter
3 files changed
+14
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 19 | | |
23 | | - | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | | - | |
30 | 24 | | |
31 | 25 | | |
32 | | - | |
33 | 26 | | |
34 | 27 | | |
35 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | | - | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
0 commit comments