continuedev / continuedev/continue
openai configuration to AnythingLLM API doesn't show response tokens
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I'm not able to find a related conversation on GitHub discussions that reports the same bug
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 11
- Continue version: 1.2.22
- IDE version: 1.124.2
- Model: OpenAI (AnythingLLM API)
- config:
- name: AnythingLLM NPU Phi3.5 3.8B 4K
provider: openai
apiKey: APIKEY
model: vscode
env:
useLegacyCompletionsEndpoint: false
apiBase: http://localhost:3001/api/v1/openai
roles:
- chat
- edit
- apply
defaultCompletionOptions:
contextLength: 4096
temperature: 0.2
maxTokens: 2048
Description
When I use the OpenAI provider along with the AnythingLLM API, responses are not shown within the chat window. Responses are being generated and chunked data is being returned as viewed within a packet capture. Other models via Ollama work fine and provide responses. A quick comparison of network traffic shows that the response data from Ollama matches that of the AnythingLLM API. Example response from the API:
POST /api/v1/openai/chat/completions HTTP/1.1
accept: application/json
accept-encoding: gzip, deflate, br
authorization: Bearer APIKEY
content-length: 1998
content-type: application/json
user-agent: OpenAI/JS 5.23.2
x-stainless-arch: arm64
x-stainless-lang: js
x-stainless-os: Windows
x-stainless-package-version: 5.23.2
x-stainless-retry-count: 0
x-stainless-runtime: node
x-stainless-runtime-version: v24.15.0
Host: 127.0.0.1:3001
Connection: close
{"messages":[{"role":"system","content":"<important_rules>\n You are in chat mode.\n\n If the user asks to make changes to files offer that they can use the Apply Button on the code block, or switch to Agent Mode to make the suggested updates automatically.\n If needed concisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.\n\n Always include the language and file name in the info string when you write code blocks.\n If you are editing \"src/main.py\" for example, your code block should start with '```python src/main.py'\n\n When addressing code modification requests, present a concise code snippet that\n emphasizes only the necessary changes and uses abbreviated placeholders for\n unmodified sections. For example:\n\n ```language /path/to/file\n // ... existing code ...\n\n {{ modified code here }}\n\n // ... existing code ...\n\n {{ another modification }}\n\n // ... rest of code ...\n ```\n\n In existing files, you should always restate the function or class that the snippet belongs to:\n\n ```language /path/to/file\n // ... existing code ...\n\n function exampleFunction() {\n // ... existing code ...\n\n {{ modified code here }}\n\n // ... rest of function ...\n }\n\n // ... rest of code ...\n ```\n\n Since users have access to their complete file, they prefer reading only the\n relevant modifications. It's perfectly acceptable to omit unmodified portions\n at the beginning, middle, or end of files using these \"lazy\" comments. Only\n provide the complete file when explicitly requested. Include a concise explanation\n of changes unless the user specifically asks for code only.\n\n</important_rules>"},{"role":"user","content":"Hey there, just testing. Are you able to help me code?"},{"role":"user","content":"Sorry, I don't seem to be getting any output from you."}],"model":"vscode","max_tokens":4096,"stream":true,"stream_options":{"include_usage":true}}
HTTP/1.1 200 OK
X-Powered-By: Express
Vary: Origin
Cache-Control: no-cache
Content-Type: text/event-stream
Access-Control-Allow-Origin: *
Connection: keep-alive
Date: Sun, 14 Jun 2026 19:24:27 GMT
Transfer-Encoding: chunked
data: {"id":"79755aff-21d8-4dca-8cce-462b39304594","object":"chat.completion","created":1781465068,"model":"vscode","choices":[{"index":0,"delta":{"role":"assistant","content":"No"},"logprobs":null,"finish_reason":null}],"usage":{}}
data: {"id":"79755aff-21d8-4dca-8cce-462b39304594","object":"chat.completion","created":1781465069,"model":"vscode","choices":[{"index":0,"delta":{"role":"assistant","content":" worries"},"logprobs":null,"finish_reason":null}],"usage":{}}
The output console shows 0 tokens returned and the logs show no errors related to responses.
To reproduce
- Install AnythingLLM and set up a Workspace connected to an LLM.
- Enable the AnythingLLM API and create an API key.
- Configure a new model on Continue to point to the AnythingLLM API along with the API key.
- Create a new chat and send the message.
- Review the console output and check the response tokens to confirm 0.
Log output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by tracing the OpenAI provider's streaming response handling and compare the AnythingLLM SSE chunks with the Ollama response path. Done means AnythingLLM responses appear in the chat and the console reports the returned response-token count instead of zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100