continue icon indicating copy to clipboard operation
continue copied to clipboard

OpenRouter chat doesn't work with some providers/models

Open priyashpatil opened this issue 1 year ago • 48 comments

Before submitting your bug report

Relevant environment info

- OS:MacOS
- Continue version: 0.9.244
- IDE version: VS Code 1.96.0
- Model:
- config.json:
  
    {
      "title": "Open Router",
      "provider": "openrouter",
      // Non Working models
      // "model": "meta-llama/llama-3.3-70b-instruct",
      // "model": "cohere/command-r7b-12-2024",
      // "model": "qwen/qwen-2.5-coder-32b-instruct",
      // "model": "google/gemini-exp-1121:free",
      // "model": "nvidia/llama-3.1-nemotron-70b-instruct",

      // Working models
      // "model": "anthropic/claude-3.5-sonnet:beta",
      // "model": "openai/gpt-4o-2024-11-20",
      // "model": "mistralai/mistral-large-2411",
      // "model": "x-ai/grok-beta",
      // "model": "amazon/nova-lite-v1",

      "apiBase": "https://openrouter.ai/api/v1",
      "apiKey": "API Key"
    },

Description

Chat doesn't work with the following test providers/models due unsupported tools context option:

  • "meta-llama/llama-3.3-70b-instruct"
  • "cohere/command-r7b-12-2024",
  • "qwen/qwen-2.5-coder-32b-instruct",
  • "google/gemini-exp-1121:free",
  • "nvidia/llama-3.1-nemotron-70b-instruct",

To reproduce

Switch the model and start chat

Log output

console.ts:137 [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "fde3d646-dcf7-4652-aafa-7e254f8f85b8",
    "messageType": "llm/streamChat",
    "data": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "type": "text",
              "text": "hello"
            }
          ]
        },
        {
          "role": "assistant",
          "content": ""
        }
      ],
      "title": "Open Router",
      "completionOptions": {
        "tools": [
          {
            "type": "function",
            "displayTitle": "Read File",
            "wouldLikeTo": "read {{{ filepath }}}",
            "readonly": true,
            "function": {
              "name": "builtin_read_file",
              "description": "Use this tool whenever you need to view the contents of a file.",
              "parameters": {
                "type": "object",
                "required": [
                  "filepath"
                ],
                "properties": {
                  "filepath": {
                    "type": "string",
                    "description": "The path of the file to read, relative to the root of the workspace."
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Create New File",
            "wouldLikeTo": "create a new file",
            "readonly": false,
            "function": {
              "name": "builtin_create_new_file",
              "description": "Create a new file",
              "parameters": {
                "type": "object",
                "required": [
                  "filepath",
                  "contents"
                ],
                "properties": {
                  "filepath": {
                    "type": "string",
                    "description": "The path where the new file should be created"
                  },
                  "contents": {
                    "type": "string",
                    "description": "The contents to write to the new file"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Run Terminal Command",
            "wouldLikeTo": "run a terminal command",
            "readonly": false,
            "function": {
              "name": "builtin_run_terminal_command",
              "description": "Run a terminal command in the current directory. The shell is not stateful and will not remember any previous commands.",
              "parameters": {
                "type": "object",
                "required": [
                  "command"
                ],
                "properties": {
                  "command": {
                    "type": "string",
                    "description": "The command to run. This will be passed directly into the shell."
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "View Subdirectory",
            "wouldLikeTo": "view the contents of \"{{{ directory_path }}}\"",
            "readonly": true,
            "function": {
              "name": "builtin_view_subdirectory",
              "description": "View the contents of a subdirectory",
              "parameters": {
                "type": "object",
                "required": [
                  "directory_path"
                ],
                "properties": {
                  "directory_path": {
                    "type": "string",
                    "description": "The path of the subdirectory to view, relative to the root of the workspace"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "View Repo Map",
            "wouldLikeTo": "view the repository map",
            "readonly": true,
            "function": {
              "name": "builtin_view_repo_map",
              "description": "View the repository map",
              "parameters": {
                "type": "object",
                "properties": {}
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Exact Search",
            "wouldLikeTo": "search for \"{{{ query }}}\" in the repository",
            "readonly": true,
            "function": {
              "name": "builtin_exact_search",
              "description": "Perform an exact search over the repository using ripgrep.",
              "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"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Search Web",
            "wouldLikeTo": "search the web for \"{{{ query }}}\"",
            "readonly": true,
            "function": {
              "name": "builtin_search_web",
              "description": "Performs a web search, returning top results. This tool should only be called for questions that require external knowledge. Common programming questions do not require web search.",
              "parameters": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "repo_url": {
                    "type": "string",
                    "description": "The natural language search query"
                  }
                }
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "View Diff",
            "wouldLikeTo": "view a diff",
            "readonly": true,
            "function": {
              "name": "builtin_view_diff",
              "description": "View the current diff of working changes",
              "parameters": {
                "type": "object",
                "properties": {}
              }
            }
          },
          {
            "type": "function",
            "displayTitle": "Read Currently Open File",
            "wouldLikeTo": "read the current file",
            "readonly": true,
            "function": {
              "name": "builtin_read_currently_open_file",
              "description": "Read the currently open file in the IDE. If the user seems to be referring to a file that you can't see, this is probably it.",
              "parameters": {
                "type": "object",
                "properties": {}
              }
            }
          }
        ]
      }
    }
  }
}

Error: HTTP 404 Not Found from https://openrouter.ai/api/v1/chat/completions

{"error":{"message":"No endpoints found that support tool use. To learn more about provider routing, visit: https://openrouter.ai/docs/provider-routing","code":404}} (at console.<anonymous> (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:26388))

priyashpatil avatar Dec 15 '24 05:12 priyashpatil

+1

C-W-D-Harshit avatar Dec 16 '24 10:12 C-W-D-Harshit

+1

Ricardomol avatar Jan 16 '25 11:01 Ricardomol

fuck

phpmac avatar Jan 19 '25 06:01 phpmac

+1

blissiraDC avatar Jan 21 '25 23:01 blissiraDC

+1

iorveth avatar Jan 27 '25 16:01 iorveth

Also occurs in deepseek/deepseek-r1:nitro

RageshAntonyHM avatar Jan 28 '25 06:01 RageshAntonyHM

+1

KoinBanks avatar Jan 28 '25 13:01 KoinBanks

+1

FelipeVeiga avatar Jan 29 '25 01:01 FelipeVeiga

Just reinstalled the extension and this is the situation now. Prior to that it was working.

gkonuralp avatar Jan 29 '25 06:01 gkonuralp

same

ShellOliver avatar Feb 05 '25 12:02 ShellOliver

+1

raphael-foliveira avatar Feb 06 '25 13:02 raphael-foliveira

same here... any thoughts on this issue ?

tomkat-cr avatar Feb 07 '25 02:02 tomkat-cr

+1

mntdherm avatar Feb 17 '25 04:02 mntdherm

Hey all! Thank you for all the +1s. This issue should now be resolved in the latest pre-release for VS Code. Would appreciate verification of this—I won't close the issue until I am sure everything is back to normal, but in my own testing with these models it seems to work

sestinj avatar Feb 17 '25 05:02 sestinj

Hey all! Thank you for all the +1s. This issue should now be resolved in the latest pre-release for VS Code. Would appreciate verification of this—I won't close the issue until I am sure everything is back to normal, but in my own testing with these models it seems to work

still some of them not working, like deepseek coder

mntdherm avatar Feb 17 '25 05:02 mntdherm

on macos it is very strange, claude and gemini model is not availiable, but others are good

sheldon123z avatar Mar 03 '25 04:03 sheldon123z

Error code: 404 - {'error': {'message': 'No endpoints found that support tool use. To learn more about provider routing, visit: https://openrouter.ai/docs/provider-routing', 'code': 404} with qwen/qwen-2-vl-7b-instruct

Sanerok avatar Mar 06 '25 16:03 Sanerok

+1 with deepseek/deepseek-r1, although used get_supported_openai_params with this link Input Params

0x0642ndt avatar Mar 14 '25 06:03 0x0642ndt

+1 same here still not working on some models...

Adlane-Be avatar Mar 25 '25 16:03 Adlane-Be

+1

jamesbanksco avatar Mar 26 '25 00:03 jamesbanksco