Skip to content

Agent and Plan mode gives 400 status error running local assistant after enabling Tools #6527

@henryfung3a27

Description

@henryfung3a27

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: v1.1.59
- IDE version: 1.101.2
- Model: DeepSeek Coder v2 Lite Instruct (vLLM)
- config:
  
name: my-config
version: 0.0.1
schema: v1
models:
  - name: AI Coder
    provider: openai
    model: /Model/Model
    apiBase: https://dev.server/aicoder/v1
    apiKey: 123456
    defaultCompletionOptions:
      contextLength: 128000
    requestOptions:
      verifySsl: false
      timeout: 7200
      caBundlePath: D:\\dev.server.crt
    roles:
      - chat
      - edit
      - apply
      - summarize
    capabilities:
      - tool_use
context:
  - provider: file
  - provider: code
  - provider: codebase
    params:
      nFinal: 10
  - provider: docs
  - provider: diff
  - provider: folder
  - provider: terminal
  - provider: currentFile
  - provider: open
  - provider: search
    params:
      maxResults: 100
  - provider: clipboard
  - provider: tree
  - provider: problems
  - provider: commit
    params:
      # how many commits to load into submenu
      Depth: 50
      # how many recent commits to include
      LastXCommitsDepth: 10
rules:
  - Give concise responses
prompts:
  - name: API route inspection
    description: Analyzes API routes for security issues
    prompt: Review this API route for security vulnerabilities. Ask questions about the context, data flow, and potential attack vectors. Be thorough in your investigation.
  - name: Generate comment
    description: Generate comment for the code
    prompt: Generate comments for the code
  - name: Generate commit message
    description: Generate Git commit message
    prompt: Generate a git commit message

Description

I was trying out the Agent mode and found out that enabling tools will give 400 (no body) error in query.

  • Tools disabled using the toggle: OK
  • Tools enabled using the toggle but exclude all tools: OK
  • Tools enabled using the toggle and only enable one tool (both Ask First and Automatic): Fail

It doesn't matter which tool is enabled. I am pretty sure the model can use tool because I have tried with other extension with the same model and is able to invoke tool use.

To reproduce

  1. Open VSCode, download latest Continue extension (v1.1.59 at the time of writing)
  2. Config the local assistant using the yaml described
  3. Send Hi in Chat mode, gives greeting output from model
  4. Select Agent mode, disable Tools and say hi, gives greeting output from model
  5. Select Agent mode, enable Tools and say hi, gives 400 (no body) error response

Continue console output

Image

Options tab in the console for the error query after enabling one tool

{
  "contextLength": 128000,
  "model": "/Model/Model",
  "maxTokens": 4096,
  "tools": [
    {
      "type": "function",
      "displayTitle": "Grep Search",
      "wouldLikeTo": "search for \"{{{ query }}}\" in the repository",
      "isCurrently": "getting search results for \"{{{ query }}}\"",
      "hasAlready": "retrieved search results for \"{{{ query }}}\"",
      "readonly": true,
      "isInstant": true,
      "group": "Built-In",
      "function": {
        "name": "grep_search",
        "description": "Perform a search over the repository using ripgrep. Output may be truncated, so use targeted queries",
        "parameters": {
          "type": "object",
          "required": [
            "query"
          ],
          "properties": {
            "query": {
              "type": "string",
              "description": "The search query to use. Must be a valid ripgrep regex expression, escaped where needed"
            }
          }
        }
      }
    }
  ]
}

Log output

> VSCode console


[Extension Host] Error: 400 status code (no body)
    at APIError.generate (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:109840:18)
    at OpenAI.makeStatusError (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:110751:25)
    at OpenAI.makeRequest (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:110795:29)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at OpenAIApi.chatCompletionStream (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:114858:26)
    at OpenAI2.streamChat (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:171737:34)
    at llmStreamChat (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:691642:17)
    at ud.handleMessage [as value] (c:\Users\User\.vscode\extensions\continue.continue-1.1.59-win32-x64\out\extension.js:726099:29)

ERR [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "059b90e0-eb72-4a2f-a0e1-8e910a99d534",
    "messageType": "llm/streamChat",
    "data": {
      "completionOptions": {
        "tools": [
          {

Metadata

Metadata

Labels

area:toolsRelates to tool usageide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windows

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions