Invalid URL and can't load any models to modal catalog
I got this invalid URL after I want to set up ollama URL.
Debug: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [0] 2024-11-07T22:57:30.459752-08:00 GetLoadedModels
Debug: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [0] 2024-11-07T22:57:30.459752-08:00 GetLoadedModels
Debug: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceLlamaSharp [0] 2024-11-07T22:57:30.460362-08:00 GetLoadedModels
Debug: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceLlamaSharp [0] 2024-11-07T22:57:30.460362-08:00 GetLoadedModels
Debug: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [0] 2024-11-07T22:57:30.462774-08:00 GetModels
Debug: Microsoft.Neutron.OpenAI.Provider.OpenAIServiceProviderOnnx [0] 2024-11-07T22:57:30.462774-08:00 GetModels
[2024-11-08T06:57:30.740Z] [ERROR] Invalid URL
but what is this Invalid URL? I can't find any settings stored the URL, can't reset. But I do able to check github models before, but now all failed.
OS version: macOS 15.2 Beta (24C5073e)
The same here, with macOS Sonoma 14.6
After reading the setting file at ~/.vscode/extensions/ms-windows-ai-studio.windows-ai-studio-0.6.0-darwin-arm64/bin/appsettings.json, I resolved this issue by deleting the entire ~/.aitk folder! (rm -rf ~/.aitk)
Thank you very much, @chunlea. That worked!
Please check out this document for adding Ollama models to AI Toolkit. According to this document, the URL format should be like this:
Use "http://localhost:11434/v1/chat/completions" as URL and leave auth empty.
Normally, if you accidentally input the wrong URL, you can right click and edit it.
If it goes wrong, you can use @chunlea's workaround as last resort. But be aware that this will DELETE EVERYTHING stored in AI Toolkit.
After reading the setting file at
~/.vscode/extensions/ms-windows-ai-studio.windows-ai-studio-0.6.0-darwin-arm64/bin/appsettings.json, I resolved this issue by deleting the entire~/.aitkfolder! (rm -rf ~/.aitk)
@chunlea Do you still have any questions? If not, I will close this issue.
@a1exwang The problem is that when you enter a wrong URL, you can no longer edit anything—at least in Mac OS. It deletes everything and prevents you from getting a new model.
@a1exwang The problem is that when you enter a wrong URL, you can no longer edit anything—at least in Mac OS. It deletes everything and prevents you from getting a new model.
Oh, now I get it. I can reproduces on Windows as well. Opened bug in internal bug tracker. 2300731
Before this bug is fixed, if anyone encounters this bug, use the following workaround to unblock yourself:
-
Find
my-models.ymlfile- Windows:
C:\Users\<username>\.aitk\models\my-models.yml - macOS:
/Users/<username>/.aitk/models/my-models.yml - Linux:
/home/<username>/.aitk/models/my-models.yml
- Windows:
-
Find the section of the invalid model you added. You can find it in
providers> a object with nameCustom>modelsversion: v0.1 providers: - name: Custom models: - - name: <the display name of your custom model> - chat_completion_url: <your invalid URL> - headers: - {} - api_model_name: <the name of your custom model> ... -
Restart Visual Studio Code.
Please be careful not to mess up this config file, otherwise, you may lose models you downloaded or added in AI Toolkit. And you should be noted that this file is internal to AI Toolkit, you should only edit it for this workaround and its schema could change in the future.
The fix will be in the next version. Don't close until next release.