zed icon indicating copy to clipboard operation
zed copied to clipboard

AI: openai language model name fails with ':' in name

Open envolution opened this issue 6 months ago • 1 comments

Summary

When configuring the model name in settings.json, an error reporting failure to connect to endpoint appears if the model 'name' contains ':'

Description

Steps to trigger the problem:

  "language_models": {
    "openai": {
      "api_url": "https://openrouter.ai/api/v1",
      "available_models": [
        {
          "name": "deepseek/deepseek-r1-0528:free",
          "display_name": "DeepSeek R1-0528-free",
          "max_tokens": 64000
        },
        {
          "name": "deepseek/deepseek-chat",
          "display_name": "DeepSeek V3",
          "max_tokens": 64000
        }
      ],
      "version": "1"
    }
  },

Actual Behavior: model 1 fails, model 2 works Expected Behavior: both models work

model 1 error message:

Error interacting with language model
Failed to connect to OpenAI API: No endpoints found that support tool use. To learn more about provider routing, visit: https://openrouter.ai/docs/provider-routing

Model Provider Details

  • Provider: openrouter through openai
  • Model Name:deepseek/deepseek-r1-0528:free
  • Mode: agent panel / write

openrouter has free models and paid models, free models demarked by modelname*:free* - these are useful for testing new releases before retooling to new models.

Zed Version and System Specs

arch zed 0.187.9 gnome-wayland

envolution avatar May 29 '25 07:05 envolution

It's not a trimming issue but openai by default sets the tool call to true, the free model from the openrouter doesn't support the tool call that's why it's erroring out. Technically like ollama and mistral we should have setting to enable and disable tool call for custom models.

imumesh18 avatar May 29 '25 11:05 imumesh18

OpenRouter is not currently supported. Perhaps soon:

  • #29496

notpeter avatar May 29 '25 14:05 notpeter