Repository navigation
fix: replace retired default Claude and Gemini models - #144
Merged
lich0821 merged 2 commits intoOct 20, 2026
Merged
Conversation
- /v1/models fallback for claude endpoints without a configured model advertised claude-sonnet-4-20250514, which has been retired. Use claude-sonnet-4-5-20250929, the same default the endpoint tests use. - Endpoint tests for gemini endpoints without a model probed gemini-pro and gemini-2.0-flash, both retired, so a working endpoint could be reported as failing. Use gemini-3.8-flash, the current stable Flash model (gemini-2.5-flash is no longer available to new API users). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-sonnet-4-5-20250929 is deprecated and retires on 2026-11-30, so the fallback would advertise a retired model again in six weeks. 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.
Problem
Several fallback model IDs that are used when an endpoint has no
modelconfigured point at models that have been retired:internal/proxy/models.go:/v1/modelslistsclaude-sonnet-4-20250514forclaudeendpoints that don't support/v1/models. A client that picks a model from that list sends requests the API rejects.internal/service/endpoint.go: the endpoint tests forgeminiendpoints probegemini-pro(TestEndpoint) andgemini-2.0-flash(testMinimalRequest). Both are retired, so a working Gemini endpoint can be reported as failing.Fix
claude-sonnet-4-6.claude-sonnet-4-5-20250929isn't used because it's deprecated and retires on 2026-11-30 (model deprecations). The endpoint tests inendpoint.gostill default to it; this PR doesn't change them.gemini-3.8-flash, the current stable Flash model.gemini-2.5-flashisn't a safe default anymore: the models page says it's limited to users who have used it before, and new API keys get a 404.Endpoints that set
modelare unaffected.Tests
internal/proxy/default_models_test.goandinternal/service/default_model_test.go. The service tests record the path the upstream receives. All three new tests failed on master (they gotclaude-sonnet-4-20250514,gemini-proandgemini-2.0-flash) and pass with the fix.go test ./... -count=1: 179 passed.cmd/desktopfails to build in a clean checkout becausefrontend/distisn't built yet. That happens on master too and is unrelated to this change.I made this change with Claude Code and checked the result myself.