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

OpenRouter chat doesn't work with some providers/models #3378

Open
3 tasks done
priyashpatil opened this issue Dec 15, 2024 · 1 comment
Open
3 tasks done

OpenRouter chat doesn't work with some providers/models #3378

priyashpatil opened this issue Dec 15, 2024 · 1 comment
Assignees
Labels
area:chat Relates to chat interface ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"

Comments

@priyashpatil
Copy link
Contributor

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))
@sestinj sestinj self-assigned this Dec 15, 2024
@dosubot dosubot bot added area:chat Relates to chat interface ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior labels Dec 15, 2024
@C-W-D-Harshit
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:chat Relates to chat interface 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