Skip to content

Fix 404 error fetching Deepseek model list#883

Open
seviezhou wants to merge 1 commit into
mainfrom
bugfix/ds_model_list
Open

Fix 404 error fetching Deepseek model list#883
seviezhou wants to merge 1 commit into
mainfrom
bugfix/ds_model_list

Conversation

@seviezhou

Copy link
Copy Markdown
Contributor

According to https://api-docs.deepseek.com/api/list-models, deepseek should use https://api.deepseek.com/models to fetch model list, no need to use anthropic or openai specific. Avoid the following error:

INFO[0121] Messages endpoint is accessible               action=fetch_models api_base="https://api.deepseek.com/anthropic" models_count=0 provider=placeholder response_time=747 success=true valid=true
ERRO[0122] Failed to fetch models from API: GET "https://api.deepseek.com/anthropic/v1/models": 404 Not Found

@seviezhou seviezhou requested a review from FFengIll May 9, 2026 04:27
fallthrough
default:
oClient, err := client.NewOpenAIClient(provider, "", typ.SessionID{})
if strings.Contains(strings.ToLower(strings.TrimSpace(provider.APIBase)), "api.deepseek.com") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this point.
BTW, we can update provider.json as fallback.
So I suggest to use config and keep code clean and general

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to look at provider.json, but there seems no separate field for model list, adding a new one will cause more code changes. So I fix it like it, should we add a new field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants