feat: AI provider improvements — auto-detect models, per-provider config#11
Open
dchau360 wants to merge 2 commits into
Open
feat: AI provider improvements — auto-detect models, per-provider config#11dchau360 wants to merge 2 commits into
dchau360 wants to merge 2 commits into
Conversation
…manent delete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Auto-fetch available models when provider is selected or URL changes - normalize_url(): accept host:port or http://host:port → adds /v1 - detect_and_fetch(): probe Ollama native API then OpenAI-compat to detect API type and fetch real model list for custom providers - fetch_anthropic_models(): fetch models from Anthropic API with x-api-key - Per-provider storage for URL, API key, and model — switching providers restores each provider's last-used settings - API key stored per-provider in keyring (AI_API_KEYS dict in config) - Anthropic preset now shows https://api.anthropic.com/v1 in URL field - Static model lists hidden for ollama/lm-studio/custom (real models only) - Startup fetch uses correct saved URL (signals blocked during init) - API type detection label shown only for custom provider Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
host:portorhttp://host:port(auto-appends/v1)https://api.anthropic.com/v1/modelsusingx-api-keyAI_API_KEYSdict in config)Test plan
host:portin custom URL field — verify it normalizes and detects API typehttp://host:portin custom URL field — verify same behaviour🤖 Generated with Claude Code