continue icon indicating copy to clipboard operation
continue copied to clipboard

Error handling model response - DeepSeek Coder 33B

Open mojtaba-shahverdi opened this issue 11 months ago • 4 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.3.28
- IDE version: 1.108.0-insider
- Model: DeepSeek Coder 33B
- config:
  
name: Local Config
version: 1.0.0
schema: v1
models:
  - name: deepseek r1
    provider: ollama
    model: deepseek-r1
  - name: DeepSeek Coder 33B
    provider: ollama
    model: deepseek-coder:33b

Description

the DeepSeek Coder 33B is running with ollama chat and on the terminal, it's working but when i try to use it with continue extension it throws this error :

**Error handling model response**
There was an error handling the response from DeepSeek Coder 33B.
Please try to submit your message again, and if the error persists, let us know by reporting the issue using the buttons below.
Image

and when i open view logs i get this in the console it opens : i've paste it in Log output section

To reproduce

No response

Log output

console.ts:139 [Extension Host] [@continuedev] error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat

 {"context":"llm_fetch","url":"http://localhost:11434/api/chat","method":"POST","model":"deepseek-coder:33b","provider":"ollama"}
 (at console.<anonymous> (file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/b76549b5cd/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:215:29517))
console.ts:139 [Extension Host] [@continuedev] error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat

 {"context":"llm_stream_chat","model":"deepseek-coder:33b","provider":"ollama","useOpenAIAdapter":false,"streamEnabled":true,"templateMessages":false}
 (at console.<anonymous> (file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/b76549b5cd/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:215:29517))
localProcessExtensionHost.ts:279 Extension Host
localProcessExtensionHost.ts:280 [@continuedev] error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat
 {"context":"llm_fetch","url":"http://localhost:11434/api/chat","method":"POST","model":"deepseek-coder:33b","provider":"ollama"}
[@continuedev] error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat
 {"context":"llm_stream_chat","model":"deepseek-coder:33b","provider":"ollama","useOpenAIAdapter":false,"streamEnabled":true,"templateMessages":false}

console.ts:139 [Extension Host] Error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat


    at _Ollama.parseError (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:281172:16)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at customFetch2 (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:281190:30)
    at withExponentialBackoff (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:276543:27)
    at _Ollama._streamChat (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:553602:26)
    at _Ollama.streamChat (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:281787:32)
    at llmStreamChat (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:803815:19)
    at Kd.handleMessage [as value] (c:\Users\USER\.vscode-insiders\extensions\continue.continue-1.3.28-win32-x64\out\extension.js:842123:29) (at console.<anonymous> (file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/b76549b5cd/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:215:29517))
log.ts:460   ERR [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "c3c727a4-1b95-4053-bbf5-5f687a6ff109",
    "messageType": "llm/streamChat",
    "data": {
      "completionOptions": {
        "reasoning": false
      },
      "title": "DeepSeek Coder 33B",
      "messages": [
        {
          "role": "system",
          "content": "<important_rules>\n  You are in agent mode.\n\n  If you need to use multiple tools, you can call multiple read-only tools simultaneously.\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 ' src/main.py'\n\n\nFor larger codeblocks (>20 lines), use brief language-appropriate placeholders for unmodified sections, e.g. '// ... existing code ...'\n\nHowever, only output codeblocks for suggestion and demonstration purposes, for example, when enumerating multiple hypothetical options. For implementing changes, use the edit tools.\n\n</important_rules>\n\n<tool_use_instructions>\nYou have access to several \"tools\" that you can use at any time to retrieve information and/or perform tasks for the User.\nTo use a tool, respond with a tool code block () using the syntax shown in the examples below:\n\nThe following tools are available to you:\n\nTo read a file with a known filepath, use the read_file tool. For example, to read a file located at 'path/to/file.txt', you would respond with this:\n\nTOOL_NAME: read_file\nBEGIN_ARG: filepath\npath/to/the_file.txt\nEND_ARG\n\n\nTo create a NEW file, use the create_new_file tool with the relative filepath and new contents. For example, to create a file located at 'path/to/file.txt', you would respond with:\n\nTOOL_NAME: create_new_file\nBEGIN_ARG: filepath\npath/to/the_file.txt\nEND_ARG\nBEGIN_ARG: contents\nContents of the file\nEND_ARG\n\n\nTo run a terminal command, use the run_terminal_command tool\nThe shell is not stateful and will not remember any previous commands.      When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.      When suggesting subsequent shell commands ALWAYS format them in shell command blocks.      Do NOT perform actions requiring special/admin privileges.      IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc).      Choose terminal commands and scripts optimized for win32 and x64 and shell powershell.exe.\nYou can also optionally include the waitForCompletion argument set to false to run the command in the background.      \nFor example, to see the git log, you could respond with:\n\nTOOL_NAME: run_terminal_command\nBEGIN_ARG: command\ngit log\nEND_ARG\n\n\nTo return a list of files based on a glob search pattern, use the file_glob_search tool\n\nTOOL_NAME: file_glob_search\nBEGIN_ARG: pattern\n*.py\nEND_ARG\n\n\nTo view the current git diff, use the view_diff tool. This will show you the changes made in the working directory compared to the last commit.\n\nTOOL_NAME: view_diff\n\n\nTo view the user's currently open file, use the read_currently_open_file tool.\nIf the user is asking about a file and you don't see any code, use this to check the current file\n\nTOOL_NAME: read_currently_open_file\n\n\nTo list files and folders in a given directory, call the ls tool with \"dirPath\" and \"recursive\". For example:\n\nTOOL_NAME: ls\nBEGIN_ARG: dirPath\npath/to/dir\nEND_ARG\nBEGIN_ARG: recursive\nfalse\nEND_ARG\n\n\nSometimes the user will provide feedback or guidance on your output. If you were not aware of these \"rules\", consider using the create_rule_block tool to persist the rule for future interactions.\nThis tool cannot be used to edit existing rules, but you can search in the \".continue/rules\" folder and use the edit tool to manage rules.\nTo create a rule, respond with a create_rule_block tool call and the following arguments:\n- name: Short, descriptive name summarizing the rule's purpose (e.g. 'React Standards', 'Type Hints')\n- rule: Clear, imperative instruction for future code generation (e.g. 'Use named exports', 'Add Python type hints'). Each rule should focus on one specific standard.\n- description: Description of when this rule should be applied. Required for Agent Requested rules (AI decides when to apply). Optional for other types.\n- globs: Optional file patterns to which this rule applies (e.g. ['**/*.{ts,tsx}'] or ['src/**/*.ts', 'tests/**/*.ts'])\n- alwaysApply: Whether this rule should always be applied. Set to false for Agent Requested and Manual rules. Omit or set to true for Always and Auto Attached rules.\nFor example:\n\nTOOL_NAME: create_rule_block\nBEGIN_ARG: name\nUse PropTypes\nEND_ARG\nBEGIN_ARG: rule\nAlways use PropTypes when declaring React component properties\nEND_ARG\nBEGIN_ARG: description\nEnsure that all prop types are explicitly declared for better type safety and code maintainability in React components.\nEND_ARG\nBEGIN_ARG: globs\n**/*.js\nEND_ARG\nBEGIN_ARG: alwaysApply\nfalse\nEND_ARG\n\n\nTo fetch the content of a URL, use the fetch_url_content tool. For example, to read the contents of a webpage, you might respond with:\n\nTOOL_NAME: fetch_url_content\nBEGIN_ARG: url\nhttps://example.com\nEND_ARG\n\n\nTo edit an EXISTING file, use the edit_existing_file tool with\n- filepath: the relative filepath to the file.\n- changes: Any modifications to the file, showing only needed changes. Do NOT wrap this in a codeblock or write anything besides the code changes. In larger files, use brief language-appropriate placeholders for large unmodified sections, e.g. '// ... existing code ...'\nOnly use this tool if you already know the contents of the file. Otherwise, use the read_file or read_currently_open_file tool to read it first.\nFor example:\n\nTOOL_NAME: edit_existing_file\nBEGIN_ARG: filepath\npath/to/the_file.ts\nEND_ARG\nBEGIN_ARG: changes\n// ... existing code ...\nfunction subtract(a: number, b: number): number {\n  return a - b;\n}\n// ... rest of code ...\nEND_ARG\n\n\nTo perform exact string replacements in files, use the single_find_and_replace tool with a filepath (relative to the root of the workspace) and the strings to find and replace.\n\n  For example, you could respond with:\n\nTOOL_NAME: single_find_and_replace\nBEGIN_ARG: filepath\npath/to/file.ts\nEND_ARG\nBEGIN_ARG: old_string\nconst oldVariable = 'value'\nEND_ARG\nBEGIN_ARG: new_string\nconst newVariable = 'updated'\nEND_ARG\nBEGIN_ARG: replace_all\nfalse\nEND_ARG\n\n\nTo perform a grep search within the project, call the grep_search tool with the query pattern to match. For example:\n\nTOOL_NAME: grep_search\nBEGIN_ARG: query\n.*main_services.*\nEND_ARG\n\n\nIf it seems like the User's request could be solved with one of the tools, choose the BEST one for the job based on the user's request and the tool descriptions\nThen send the  codeblock (YOU call the tool, not the user). Always start the codeblock on a new line.\nDo not perform actions with/for hypothetical files. Ask the user or use tools to deduce which files are relevant.\nYou can only call ONE tool at at time. The tool codeblock should be the last thing you say; stop your response after the tool codeblock.\n</tool_use_instructions>"
        },
        {
          "role": "user",
          "content": "hi"
        }
      ],
      "messageOptions": {
        "precompiled": true
      }
    }
  }
}

Error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat


error @ log.ts:460
console.ts:139 [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "c3c727a4-1b95-4053-bbf5-5f687a6ff109",
    "messageType": "llm/streamChat",
    "data": {
      "completionOptions": {
        "reasoning": false
      },
      "title": "DeepSeek Coder 33B",
      "messages": [
        {
          "role": "system",
          "content": "<important_rules>\n  You are in agent mode.\n\n  If you need to use multiple tools, you can call multiple read-only tools simultaneously.\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 ' src/main.py'\n\n\nFor larger codeblocks (>20 lines), use brief language-appropriate placeholders for unmodified sections, e.g. '// ... existing code ...'\n\nHowever, only output codeblocks for suggestion and demonstration purposes, for example, when enumerating multiple hypothetical options. For implementing changes, use the edit tools.\n\n</important_rules>\n\n<tool_use_instructions>\nYou have access to several \"tools\" that you can use at any time to retrieve information and/or perform tasks for the User.\nTo use a tool, respond with a tool code block () using the syntax shown in the examples below:\n\nThe following tools are available to you:\n\nTo read a file with a known filepath, use the read_file tool. For example, to read a file located at 'path/to/file.txt', you would respond with this:\n\nTOOL_NAME: read_file\nBEGIN_ARG: filepath\npath/to/the_file.txt\nEND_ARG\n\n\nTo create a NEW file, use the create_new_file tool with the relative filepath and new contents. For example, to create a file located at 'path/to/file.txt', you would respond with:\n\nTOOL_NAME: create_new_file\nBEGIN_ARG: filepath\npath/to/the_file.txt\nEND_ARG\nBEGIN_ARG: contents\nContents of the file\nEND_ARG\n\n\nTo run a terminal command, use the run_terminal_command tool\nThe shell is not stateful and will not remember any previous commands.      When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.      When suggesting subsequent shell commands ALWAYS format them in shell command blocks.      Do NOT perform actions requiring special/admin privileges.      IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc).      Choose terminal commands and scripts optimized for win32 and x64 and shell powershell.exe.\nYou can also optionally include the waitForCompletion argument set to false to run the command in the background.      \nFor example, to see the git log, you could respond with:\n\nTOOL_NAME: run_terminal_command\nBEGIN_ARG: command\ngit log\nEND_ARG\n\n\nTo return a list of files based on a glob search pattern, use the file_glob_search tool\n\nTOOL_NAME: file_glob_search\nBEGIN_ARG: pattern\n*.py\nEND_ARG\n\n\nTo view the current git diff, use the view_diff tool. This will show you the changes made in the working directory compared to the last commit.\n\nTOOL_NAME: view_diff\n\n\nTo view the user's currently open file, use the read_currently_open_file tool.\nIf the user is asking about a file and you don't see any code, use this to check the current file\n\nTOOL_NAME: read_currently_open_file\n\n\nTo list files and folders in a given directory, call the ls tool with \"dirPath\" and \"recursive\". For example:\n\nTOOL_NAME: ls\nBEGIN_ARG: dirPath\npath/to/dir\nEND_ARG\nBEGIN_ARG: recursive\nfalse\nEND_ARG\n\n\nSometimes the user will provide feedback or guidance on your output. If you were not aware of these \"rules\", consider using the create_rule_block tool to persist the rule for future interactions.\nThis tool cannot be used to edit existing rules, but you can search in the \".continue/rules\" folder and use the edit tool to manage rules.\nTo create a rule, respond with a create_rule_block tool call and the following arguments:\n- name: Short, descriptive name summarizing the rule's purpose (e.g. 'React Standards', 'Type Hints')\n- rule: Clear, imperative instruction for future code generation (e.g. 'Use named exports', 'Add Python type hints'). Each rule should focus on one specific standard.\n- description: Description of when this rule should be applied. Required for Agent Requested rules (AI decides when to apply). Optional for other types.\n- globs: Optional file patterns to which this rule applies (e.g. ['**/*.{ts,tsx}'] or ['src/**/*.ts', 'tests/**/*.ts'])\n- alwaysApply: Whether this rule should always be applied. Set to false for Agent Requested and Manual rules. Omit or set to true for Always and Auto Attached rules.\nFor example:\n\nTOOL_NAME: create_rule_block\nBEGIN_ARG: name\nUse PropTypes\nEND_ARG\nBEGIN_ARG: rule\nAlways use PropTypes when declaring React component properties\nEND_ARG\nBEGIN_ARG: description\nEnsure that all prop types are explicitly declared for better type safety and code maintainability in React components.\nEND_ARG\nBEGIN_ARG: globs\n**/*.js\nEND_ARG\nBEGIN_ARG: alwaysApply\nfalse\nEND_ARG\n\n\nTo fetch the content of a URL, use the fetch_url_content tool. For example, to read the contents of a webpage, you might respond with:\n\nTOOL_NAME: fetch_url_content\nBEGIN_ARG: url\nhttps://example.com\nEND_ARG\n\n\nTo edit an EXISTING file, use the edit_existing_file tool with\n- filepath: the relative filepath to the file.\n- changes: Any modifications to the file, showing only needed changes. Do NOT wrap this in a codeblock or write anything besides the code changes. In larger files, use brief language-appropriate placeholders for large unmodified sections, e.g. '// ... existing code ...'\nOnly use this tool if you already know the contents of the file. Otherwise, use the read_file or read_currently_open_file tool to read it first.\nFor example:\n\nTOOL_NAME: edit_existing_file\nBEGIN_ARG: filepath\npath/to/the_file.ts\nEND_ARG\nBEGIN_ARG: changes\n// ... existing code ...\nfunction subtract(a: number, b: number): number {\n  return a - b;\n}\n// ... rest of code ...\nEND_ARG\n\n\nTo perform exact string replacements in files, use the single_find_and_replace tool with a filepath (relative to the root of the workspace) and the strings to find and replace.\n\n  For example, you could respond with:\n\nTOOL_NAME: single_find_and_replace\nBEGIN_ARG: filepath\npath/to/file.ts\nEND_ARG\nBEGIN_ARG: old_string\nconst oldVariable = 'value'\nEND_ARG\nBEGIN_ARG: new_string\nconst newVariable = 'updated'\nEND_ARG\nBEGIN_ARG: replace_all\nfalse\nEND_ARG\n\n\nTo perform a grep search within the project, call the grep_search tool with the query pattern to match. For example:\n\nTOOL_NAME: grep_search\nBEGIN_ARG: query\n.*main_services.*\nEND_ARG\n\n\nIf it seems like the User's request could be solved with one of the tools, choose the BEST one for the job based on the user's request and the tool descriptions\nThen send the  codeblock (YOU call the tool, not the user). Always start the codeblock on a new line.\nDo not perform actions with/for hypothetical files. Ask the user or use tools to deduce which files are relevant.\nYou can only call ONE tool at at time. The tool codeblock should be the last thing you say; stop your response after the tool codeblock.\n</tool_use_instructions>"
        },
        {
          "role": "user",
          "content": "hi"
        }
      ],
      "messageOptions": {
        "precompiled": true
      }
    }
  }
}

Error: HTTP 502 Bad Gateway from http://127.0.0.1:11434/api/chat

 (at console.<anonymous> (file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/b76549b5cd/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:215:29517))
bxs @ console.ts:139

mojtaba-shahverdi avatar Dec 19 '25 03:12 mojtaba-shahverdi

Related Issues

General "Error handling model response" issues:

  • #9211 - Error handling model response
  • #9191 - Error handling model response
  • #9127 - Error handling model response
  • #9126 - Error handling model response
  • #9014 - Error handling model response
  • #8969 - Error handling model response (tools-related)
  • #8940 - Error handling Model Response
  • #8920 - Error handling model response
  • #8767 - Error handling model response
  • #8307 - Error handling model response
  • #7739 - Error handling model response

DeepSeek-specific issues:

  • #9180 - Error: DeepSeek Coder - 402 (Insufficient Balance)
  • #9142 - Error: DeepSeek Coder - 402 (Insufficient Balance)
  • #9039 - Sửa lỗi không thể thêm Deepseek R1/R3 vào continue trong vscode
  • #9015 - deepseek integration
  • #8989 - When use deepseek v3.2 as agent, throw "400 Missing reasoning_content field in the assistant message at message index 2"
  • #8623 - Using DeepSeekCoder as an agent

Ollama/HTTP error issues:

  • #5115 - Trusted self-signed certificate works for chatting but not for auto-completion (includes 502 errors)
  • #415 - Cannot run local Ollama behind corporate proxy, errors with "502 Bad Gateway" (CLOSED - fixed)
  • #8496 - Connect error to remote ollama model from Jet Brains IDE
  • #4650 - VS Code Chat Ollama on local server ETIMEDOUT

Agent mode + Ollama issues:

  • #7828 - MCP tools don't work with Ollama models

continue avatar Dec 19 '25 03:12 continue

Related Issues

General "Error handling model response" issues:

DeepSeek-specific issues:

Ollama/HTTP error issues:

Agent mode + Ollama issues:

i've already checked all of those and there is no fix for my issue

mojtaba-shahverdi avatar Dec 19 '25 22:12 mojtaba-shahverdi

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Mar 20 '26 02:03 github-actions[bot]

Fixed by https://github.com/continuedev/continue/pull/11290

RomneyDa avatar Mar 25 '26 02:03 RomneyDa