zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.42k stars 2.89k forks source link

api_url setting not working in project directory settings , #18390

Open red-co opened 2 weeks ago

red-co commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

The api url setting is not working, I used the following configuration, but zed does not access port 8080 and does not list model_001, it still accesses openai company server.

{
  "language_models": {
    "openai": {
      "version": "1",
      "api_url": "http://127.0.0.1:8080/",
      "low_speed_timeout_in_seconds": 30,
      "available_models": [
        {
          "provider": "openai",
          "name": "model_001",
          "display_name": "model_001",
          "max_tokens": 1024
        }
      ]
    }
  }
}

Environment

windows10, zed-0.154.2

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

request completed with error: failed to connect to the server
2024-09-26T19:45:19.5195941+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5196687+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5197619+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5348445+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5349744+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5354764+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5355815+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5356708+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5357612+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5358475+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5359359+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5360269+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5361151+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5362012+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5508628+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5512068+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5513305+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.5515383+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.6599302+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.675738+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.73835+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.7385788+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.7386781+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-26T19:45:19.9256308+08:00 [WARN] request completed with error: failed to connect to the server
birdmanmandbir commented 2 weeks ago

try to add this, work for me:

  "assistant": {
    // Version of this setting.
    "version": "2",
    "default_model": {
      "provider": "openai",
      "model": "gpt-4o"
    }
  },
red-co commented 1 week ago

I found the real problem, Zed has three settings locations,