Fetch model list from custom endpoints (#1598 follow-up) - #1636
Conversation
…alog (Kulitorum#1598 follow-up) When a custom endpoint is configured for OpenAI or Anthropic (e.g., a gateway proxy), the hardcoded model catalogs might not match what the endpoint actually serves. This adds dynamic model fetching via /v1/models, replicating the existing Ollama pattern: - OpenAI/AnthropicProvider: add refreshModels() that GETs /v1/models, emits modelsRefreshed(QStringList), and reports results via testResult - setModel() skips catalog validation when a custom endpoint is set - AIManager: new customEndpointModels Q_PROPERTY, auto-refreshes when settings change and a custom endpoint is active - QML: shows ComboBox + Refresh button (like Ollama picker) when a custom endpoint is configured, hides the fixed catalog picker Co-Authored-By: Claude <noreply@anthropic.com>
|
Chris I am not sure how well this will work. For each model change I have had to change the prompt. Things like caching and level level of thinking have had to change each time to either make it work or get good results. On a related note have you tried the MCP. On my Android tablet I mostly am using Claude desktop on Android using the discus button. Not sure if you have a chat app running on your tablet that works with an MCP, but the MCP is a lot more powerful then the AI assistant. |
|
Fair enough, though without this change or something else I don't think my custom endpoint setting I built will work for me or anyone else. The endpoint needs to have the model call structured specifically, so the models list you've built in isn't compatible. Happy to try another approach if you have any ideas. |
|
can you say more about what models you have available? I thought you had a proxy, so not sure why on your side you could not make the Decenza available ones or at least one of them available. Not being able to tune the prompt is why open router and ollama do not work very well and why I push people back to the big 3 when they complain as those are the ones I spent time and money to test. Happy to work on a solution with you, still not sure I fully understand your needs. |
Summary
Follow-up to #1598 (custom endpoint URLs). When a custom endpoint is configured, the hardcoded model catalogs (e.g.
claude-sonnet-4-6,gpt-5.4) might not match what the endpoint serves. This adds dynamic model fetching via/v1/models, replicating the existing Ollama pattern.refreshModels()that GETs/v1/modelsand emits the model listsetModel()skips catalog validation when a custom endpoint is set (accepts any model string)customEndpointModelsQ_PROPERTY, auto-refreshes on endpoint change🤖 Generated with Claude Code