Repository navigation
Stop retired models from failing API key checks; lock off unavailable models - #420
Merged
Merged
Conversation
OpenRouter key validation sent a test message to
liquid/lfm-2.5-1.2b-thinking:free, which OpenRouter removed, so every
OpenRouter key failed with "No endpoints found" and the provider stayed off.
- OpenRouter checks the key with GET /api/v1/key.
- OpenAI, Anthropic, Google, Mistral, Groq and DeepSeek check the key by
listing models; OpenAI accepts 403 (restricted key without model-read).
This also fixes Groq, whose test model llama3-8b-8192 was retired.
- Perplexity and Requesty still send a test message, but an error about the
test model no longer counts as a bad key.
- The provider settings lock off chat models the provider no longer lists
("No longer available from <provider>") without changing saved toggles.
Dots and hyphens compare equal so aliases like
anthropic/claude-haiku-4-5 are not flagged. If the list can't be fetched,
every model stays available.
Co-Authored-By: Claude Opus 5.5 <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
Adding an OpenRouter key failed with "No endpoints found for liquid/lfm-2.5-1.2b-thinking:free": the key check sent a test message to a free model OpenRouter has removed. A new provider is only turned on after the check passes, so the key was saved but OpenRouter stayed off. It looked connected but didn't work.
Rule applied everywhere: a retired model never fails a provider. It only can't be turned on.
Key checks
liquid/lfm-2.5-1.2b-thinking:free(404)GET /api/v1/keygpt-5-nanoGET /v1/models(403 = restricted key, accepted)claude-haiku-4-5-20251001GET /v1/modelsgemini-2.5-flash:generateContentGET /v1beta/modelsmistral-tinyGET /v1/modelsllama3-8b-8192(retired, always failed)GET /openai/v1/modelsdeepseek-v4-flashGET /modelsUnavailable models
The provider dialog fetches the provider's model list and locks off chat models it no longer lists, labelled "No longer available from ". Saved toggles are not changed, so a model that comes back keeps its setting. Dots and hyphens compare equal, because OpenRouter serves
anthropic/claude-haiku-4-5but listsanthropic/claude-haiku-4.5. If the list can't be fetched or comes back empty, every model stays available.Live today, this flags only OpenRouter's
xiaomi/mimo-v2-omniandxiaomi/mimo-v2-pro(0 endpoints). Nothing is flagged for OpenAI, Anthropic or Google.Test plan
LLMValidationService.test.ts(23),ProviderModelAvailability.test.ts(12). The validator tests fail on the old code (7 of the original 14).npm run buildpasses🤖 Generated with Claude Code