Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ollama models with tools capability unable to read linked / indexed files possibly due to indexing #4379

Open
3 tasks done
Octanoz opened this issue Feb 26, 2025 · 1 comment
Assignees
Labels
area:indexing Relates to embedding and indexing ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"

Comments

@Octanoz
Copy link

Octanoz commented Feb 26, 2025

Before submitting your bug report

Relevant environment info

- OS: Win11
- Continue version: 0.8.68
- IDE version: VS Code 1.97.2
- Model: Llama3.1, home grown
- config:
  
%YAML 1.1
---

name: standard-config
version: 0.0.2

ollama_defaults: &ollama_defaults
  provider: ollama
  apiBase: http://localhost:11434

ac_model: &ac_model
  defaultCompletionOptions:
      temperature: 0.1
      mirostat: 2

regular_model: &regular_model
  defaultCompletionOptions:
      temperature: 0.4
      mirostat: 2
  roles:
      - chat
      - edit
      - apply

ice_cold: &ice_cold
  defaultCompletionOptions:
      temperature: 0
      mirostat: 2
  roles:
      - chat
      - edit
      - apply

creative_model: &creative_model
  defaultCompletionOptions:
      temperature: 0.7
      mirostat: 0
  roles:
      - chat
      - edit
      - apply

models:
  - name: Llama3.1
    <<: *ollama_defaults
    model: llama3.1
    <<: *regular_model

  - name: DeepSeek-R1-Llama3
    <<: *ollama_defaults
    model: deepseek-r1:8b
    <<: *creative_model

  - name: DeepSeek-R1-Qwen2.5
    <<: *ollama_defaults
    model: deepseek-r1:7b
    <<: *regular_model

  - name: DeepSeek-Coder
    <<: *ollama_defaults
    model: deepseek-coder:6.7b
    <<: *ice_cold

  - name: Open Thinker
    <<: *ollama_defaults
    model: openthinker
    <<: *creative_model

  - name: Qwen-2.5-Coder
    <<: *ollama_defaults
    model: qwen2.5-coder
    <<: *regular_model

  - name: Winnie the Pooh
    <<: *ollama_defaults
    model: yi-coder
    <<: *ice_cold

  - name: Qwen-2.5 AC
    <<: *ollama_defaults
    model: qwen2.5-coder:3b
    <<: *ac_model

  - name: Llama3.2
    <<: *ollama_defaults
    model: Llama3.2
    <<: *ac_model

  - name: StarCoder AC
    <<: *ollama_defaults
    model: starcoder2
    <<: *ac_model
  
  - name: Nomic Embed
    <<: *ollama_defaults
    model: nomic-embed-text
    role:
      - embed
      
context:
  - provider: code
  
  - provider: docs
  
  - provider: diff
  
  - provider: terminal
  
  - provider: problems
  
  - provider: folder
  
  - provider: codebase
  
rules:
    - When writing C# always prefer explicit typing if you are instantiating a collection or a class from a constructor. Only use var when using a method or LINQ to generate the object.
    - When writing F# try to facilitate the use of pipes and prefer pattern matching over if-else unless you're evaluating a boolean statement.
prompts:
  - name: check
    description: Check for mistakes in my code
    prompt: |
      Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:
        - Syntax errors
        - Logic errors
        - Security vulnerabilities
        - Performance issues
        - Anything else that looks wrong

      Once you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found.
  - name: test
    description: Write unit tests for the highlighted code
    prompt:  |
      Write a comprehensive set of unit tests for the selected code. Make sure that for C# and F# the tests are written using the Xunit library. Setup and run tests that check for correctness including important edge
      cases, and teardown. Ensure that the tests are complete and sophisticated.
      Give the tests just as chat output, don't edit any file.
docs:
  - name: F# Language Reference
    startUrl: https://learn.microsoft.com/en-gb/dotnet/fsharp/language-reference/
  - name: F# Core Library Docs
    startUrl: https://fsharp.github.io/fsharp-core-docs/

Description

I noticed that the models with tools on Ollama that I'm using, Llama3.1 and Qwen2.5-coder, tend to get this infinite loading spinner and the message: "Continue wants to read filename" with the read permission set to automatic.

I did notice that there was a message in early january saying that currently only Claude Sonnet is supported as model using tools. Is that still the case?

In case it isn't I did have a look at the dev tools of VS Code and I noticed it seems to be looking in the c folder for the file. Perhaps it could've found it if it went to the C: drive instead... In this case the :\ came before the drive. Possible indexing / parsing bug? Everything has just been newly indexed after the previously cache was lost when I switched to the yaml config file.

I believe the below shows me actively linking with @Files -> filename in the top 2 messages and the last one is the extension pro-actively reading what's open on the screen. But there as well, the actual relative path from the solution folder to that file would be 2 folders down (i.e. InputFiles/Day12/)

log.ts:456   ERR [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "e552fdc2-d5d1-47b1-8128-9a0ae23c1fc9",
    "messageType": "tools/call",
    "data": {
      "toolCall": {
        "id": "",
        "type": "function",
        "function": {
          "name": "builtin_read_file",
          "arguments": "{\"filepath\":\"/c/Users/etc/instructions.md\"}"
        }
      },
      "selectedModelTitle": "Llama3.1"
    }
  }
}
Error: Could not find file /c/Users/etc/instructions.md
error @ log.ts:456
console.ts:137 [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "e552fdc2-d5d1-47b1-8128-9a0ae23c1fc9",
    "messageType": "tools/call",
    "data": {
      "toolCall": {
        "id": "",
        "type": "function",
        "function": {
          "name": "builtin_read_file",
          "arguments": "{\"filepath\":\"/c/Users/etc/instructions.md\"}"
        }
      },
      "selectedModelTitle": "Llama3.1"
    }
  }
Error: Could not find file /c/Users/etc/instructions.md
Ats @ console.ts:137
index.js:545 Received streamed tool call response prior to initial tool call delta
streamUpdate @ index.js:545
log.ts:456   ERR [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "f41952ee-be98-40e3-accc-4cd8ac342b95",
    "messageType": "tools/call",
    "data": {
      "toolCall": {
        "id": "",
        "type": "function",
        "function": {
          "name": "builtin_read_file",
          "arguments": "{\"filepath\":\"instructions.md\"}"
        }
      },
      "selectedModelTitle": "Llama3.1"
    }
  }
}
Error: Could not find file instructions.md
error @ log.ts:456
console.ts:137 [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "f41952ee-be98-40e3-accc-4cd8ac342b95",
    "messageType": "tools/call",
    "data": {
      "toolCall": {
        "id": "",
        "type": "function",
        "function": {
          "name": "builtin_read_file",
          "arguments": "{\"filepath\":\"instructions.md\"}"
        }
      },
      "selectedModelTitle": "Llama3.1"
    }
  }
}

Error: Could not find file instructions.md
}

To reproduce

  1. Open chat session.
  2. Give some instructions while also linking a currently open file with @Files
  3. Infinite spinner "Continue wants to read X"
  4. Patiently stare at the spinner for the rest of the day

Log output

@dosubot dosubot bot added area:indexing Relates to embedding and indexing ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior labels Feb 26, 2025
@weignerg
Copy link

I am experiencing exactly this as well.

Using ollama / qwen2.5-coder:32b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:indexing Relates to embedding and indexing ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"
Projects
None yet
Development

No branches or pull requests

3 participants