Skip to content

[Model provider]Can't remove model #38388

Closed

Description

@leslie2046

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Image Image Image Still exists

✔️ Expected Behavior

No error

❌ Actual Behavior

2026-07-03 16:55:18,966 DEBUG [_trace.py:47] 1f721ca6aa close.started
2026-07-03 16:55:18,966 DEBUG [_trace.py:47] 1f721ca6aa close.complete
2026-07-03 16:55:18,967 DEBUG [_trace.py:47] 1f721ca6aa connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2026-07-03 16:55:18,968 DEBUG [_trace.py:47] 1f721ca6aa connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x734681a15ac0>
2026-07-03 16:55:18,968 DEBUG [_trace.py:47] 1f721ca6aa send_request_headers.started request=<Request [b'POST']>
2026-07-03 16:55:18,968 DEBUG [_trace.py:47] 1f721ca6aa send_request_headers.complete
2026-07-03 16:55:18,968 DEBUG [_trace.py:47] 1f721ca6aa send_request_body.started request=<Request [b'POST']>
2026-07-03 16:55:18,969 DEBUG [_trace.py:47] 1f721ca6aa send_request_body.complete
2026-07-03 16:55:18,969 DEBUG [_trace.py:47] 1f721ca6aa receive_response_headers.started request=<Request [b'POST']>
2026-07-03 16:55:18,993 DEBUG [_trace.py:47] 1f721ca6aa receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:18 GMT'), (b'Transfer-Encoding', b'chunked')])
2026-07-03 16:55:18,993 INFO [_client.py:1025] 1f721ca6aa HTTP Request: POST http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/installation/fetch/batch "HTTP/1.1 200 OK"
2026-07-03 16:55:18,994 DEBUG [_trace.py:47] 1f721ca6aa receive_response_body.started request=<Request [b'POST']>
2026-07-03 16:55:18,996 DEBUG [_trace.py:47] 1f721ca6aa receive_response_body.complete
2026-07-03 16:55:18,996 DEBUG [_trace.py:47] 1f721ca6aa response_closed.started
2026-07-03 16:55:18,997 DEBUG [_trace.py:47] 1f721ca6aa response_closed.complete
2026-07-03 16:55:19,121 INFO [_internal.py:97] 1f721ca6aa 127.0.0.1 - - [03/Jul/2026 08:55:19] "POST /console/api/workspaces/current/plugin/list/installations/ids HTTP/1.1" 200 -
2026-07-03 16:55:19,216 INFO [_internal.py:97] 1d93a59b44 127.0.0.1 - - [03/Jul/2026 08:55:19] "GET /console/api/workspaces/current/model-providers/langgenius/xinference/xinference/models/credentials?model=bge-reranker-large&model_type=rerank&config_from=custom-model HTTP/1.1" 200 -
2026-07-03 16:55:20,192 DEBUG [_trace.py:47] f6f9e5936f send_request_headers.started request=<Request [b'GET']>
2026-07-03 16:55:20,192 DEBUG [_trace.py:47] f6f9e5936f send_request_headers.complete
2026-07-03 16:55:20,192 DEBUG [_trace.py:47] f6f9e5936f send_request_body.started request=<Request [b'GET']>
2026-07-03 16:55:20,192 DEBUG [_trace.py:47] f6f9e5936f send_request_body.complete
2026-07-03 16:55:20,192 DEBUG [_trace.py:47] f6f9e5936f receive_response_headers.started request=<Request [b'GET']>
2026-07-03 16:55:20,193 DEBUG [_trace.py:47] f6f9e5936f receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:20 GMT'), (b'Content-Length', b'40')])
2026-07-03 16:55:20,193 INFO [_client.py:1025] f6f9e5936f HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/install/tasks?page=1&page_size=100 "HTTP/1.1 200 OK"
2026-07-03 16:55:20,193 DEBUG [_trace.py:47] f6f9e5936f receive_response_body.started request=<Request [b'GET']>
2026-07-03 16:55:20,194 DEBUG [_trace.py:47] f6f9e5936f receive_response_body.complete
2026-07-03 16:55:20,194 DEBUG [_trace.py:47] f6f9e5936f response_closed.started
2026-07-03 16:55:20,194 DEBUG [_trace.py:47] f6f9e5936f response_closed.complete
2026-07-03 16:55:20,196 INFO [_internal.py:97] f6f9e5936f 127.0.0.1 - - [03/Jul/2026 08:55:20] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 -
2026-07-03 16:55:25,219 DEBUG [_trace.py:47] 09fe018ec1 close.started
2026-07-03 16:55:25,219 DEBUG [_trace.py:47] 09fe018ec1 close.complete
2026-07-03 16:55:25,219 DEBUG [_trace.py:47] 09fe018ec1 connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2026-07-03 16:55:25,219 DEBUG [_trace.py:47] 09fe018ec1 connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x734681d8dcd0>
2026-07-03 16:55:25,219 DEBUG [_trace.py:47] 09fe018ec1 send_request_headers.started request=<Request [b'GET']>
2026-07-03 16:55:25,220 DEBUG [_trace.py:47] 09fe018ec1 send_request_headers.complete
2026-07-03 16:55:25,220 DEBUG [_trace.py:47] 09fe018ec1 send_request_body.started request=<Request [b'GET']>
2026-07-03 16:55:25,220 DEBUG [_trace.py:47] 09fe018ec1 send_request_body.complete
2026-07-03 16:55:25,220 DEBUG [_trace.py:47] 09fe018ec1 receive_response_headers.started request=<Request [b'GET']>
2026-07-03 16:55:25,220 DEBUG [_trace.py:47] 09fe018ec1 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:25 GMT'), (b'Content-Length', b'40')])
2026-07-03 16:55:25,220 INFO [_client.py:1025] 09fe018ec1 HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/install/tasks?page=1&page_size=100 "HTTP/1.1 200 OK"
2026-07-03 16:55:25,221 DEBUG [_trace.py:47] 09fe018ec1 receive_response_body.started request=<Request [b'GET']>
2026-07-03 16:55:25,221 DEBUG [_trace.py:47] 09fe018ec1 receive_response_body.complete
2026-07-03 16:55:25,221 DEBUG [_trace.py:47] 09fe018ec1 response_closed.started
2026-07-03 16:55:25,221 DEBUG [_trace.py:47] 09fe018ec1 response_closed.complete
2026-07-03 16:55:25,223 INFO [_internal.py:97] 09fe018ec1 127.0.0.1 - - [03/Jul/2026 08:55:25] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 -
2026-07-03 16:55:26,481 INFO [_internal.py:97] c9c717fd65 127.0.0.1 - - [03/Jul/2026 08:55:26] "DELETE /console/api/workspaces/current/model-providers/langgenius/xinference/xinference/models HTTP/1.1" 204 -
2026-07-03 16:55:27,122 INFO [_internal.py:97] 6017715750 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/model-providers HTTP/1.1" 200 -
2026-07-03 16:55:27,136 INFO [_internal.py:97] d305966adf 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/models/model-types/text-embedding HTTP/1.1" 200 -
2026-07-03 16:55:27,142 INFO [_internal.py:97] 31edbac44d 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/models/model-types/rerank HTTP/1.1" 200 -
2026-07-03 16:55:27,156 INFO [_internal.py:97] d02b80a4c1 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/models/model-types/tts HTTP/1.1" 200 -
2026-07-03 16:55:27,166 INFO [_internal.py:97] 619dca1ce8 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/models/model-types/llm HTTP/1.1" 200 -
2026-07-03 16:55:27,172 INFO [_internal.py:97] 749fc0f6f7 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/models/model-types/speech2text HTTP/1.1" 200 -
2026-07-03 16:55:27,178 INFO [_internal.py:97] 189378813c 127.0.0.1 - - [03/Jul/2026 08:55:27] "GET /console/api/workspaces/current/model-providers/langgenius%2Fxinference%2Fxinference/models HTTP/1.1" 200 -
2026-07-03 16:55:30,260 DEBUG [_trace.py:47] 48f456b866 close.started
2026-07-03 16:55:30,260 DEBUG [_trace.py:47] 48f456b866 close.complete
2026-07-03 16:55:30,260 DEBUG [_trace.py:47] 48f456b866 connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2026-07-03 16:55:30,260 DEBUG [_trace.py:47] 48f456b866 connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7346d42259d0>
2026-07-03 16:55:30,261 DEBUG [_trace.py:47] 48f456b866 send_request_headers.started request=<Request [b'GET']>
2026-07-03 16:55:30,261 DEBUG [_trace.py:47] 48f456b866 send_request_headers.complete
2026-07-03 16:55:30,261 DEBUG [_trace.py:47] 48f456b866 send_request_body.started request=<Request [b'GET']>
2026-07-03 16:55:30,261 DEBUG [_trace.py:47] 48f456b866 send_request_body.complete
2026-07-03 16:55:30,261 DEBUG [_trace.py:47] 48f456b866 receive_response_headers.started request=<Request [b'GET']>
2026-07-03 16:55:30,262 DEBUG [_trace.py:47] 48f456b866 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:30 GMT'), (b'Content-Length', b'40')])
2026-07-03 16:55:30,262 INFO [_client.py:1025] 48f456b866 HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/install/tasks?page=1&page_size=100 "HTTP/1.1 200 OK"
2026-07-03 16:55:30,262 DEBUG [_trace.py:47] 48f456b866 receive_response_body.started request=<Request [b'GET']>
2026-07-03 16:55:30,262 DEBUG [_trace.py:47] 48f456b866 receive_response_body.complete
2026-07-03 16:55:30,262 DEBUG [_trace.py:47] 48f456b866 response_closed.started
2026-07-03 16:55:30,263 DEBUG [_trace.py:47] 48f456b866 response_closed.complete
2026-07-03 16:55:30,264 INFO [_internal.py:97] 48f456b866 127.0.0.1 - - [03/Jul/2026 08:55:30] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 -
2026-07-03 16:55:35,293 DEBUG [_trace.py:47] bf97b831de close.started
2026-07-03 16:55:35,293 DEBUG [_trace.py:47] bf97b831de close.complete
2026-07-03 16:55:35,293 DEBUG [_trace.py:47] bf97b831de connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2026-07-03 16:55:35,293 DEBUG [_trace.py:47] bf97b831de connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7346d427a180>
2026-07-03 16:55:35,294 DEBUG [_trace.py:47] bf97b831de send_request_headers.started request=<Request [b'GET']>
2026-07-03 16:55:35,294 DEBUG [_trace.py:47] bf97b831de send_request_headers.complete
2026-07-03 16:55:35,294 DEBUG [_trace.py:47] bf97b831de send_request_body.started request=<Request [b'GET']>
2026-07-03 16:55:35,294 DEBUG [_trace.py:47] bf97b831de send_request_body.complete
2026-07-03 16:55:35,294 DEBUG [_trace.py:47] bf97b831de receive_response_headers.started request=<Request [b'GET']>
2026-07-03 16:55:35,295 DEBUG [_trace.py:47] bf97b831de receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:35 GMT'), (b'Content-Length', b'40')])
2026-07-03 16:55:35,295 INFO [_client.py:1025] bf97b831de HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/install/tasks?page=1&page_size=100 "HTTP/1.1 200 OK"
2026-07-03 16:55:35,295 DEBUG [_trace.py:47] bf97b831de receive_response_body.started request=<Request [b'GET']>
2026-07-03 16:55:35,295 DEBUG [_trace.py:47] bf97b831de receive_response_body.complete
2026-07-03 16:55:35,295 DEBUG [_trace.py:47] bf97b831de response_closed.started
2026-07-03 16:55:35,295 DEBUG [_trace.py:47] bf97b831de response_closed.complete
2026-07-03 16:55:35,297 INFO [_internal.py:97] bf97b831de 127.0.0.1 - - [03/Jul/2026 08:55:35] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 -
2026-07-03 16:55:40,324 DEBUG [_trace.py:47] 60e384f28f close.started
2026-07-03 16:55:40,324 DEBUG [_trace.py:47] 60e384f28f close.complete
2026-07-03 16:55:40,325 DEBUG [_trace.py:47] 60e384f28f connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2026-07-03 16:55:40,325 DEBUG [_trace.py:47] 60e384f28f connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7346d43cb170>
2026-07-03 16:55:40,325 DEBUG [_trace.py:47] 60e384f28f send_request_headers.started request=<Request [b'GET']>
2026-07-03 16:55:40,325 DEBUG [_trace.py:47] 60e384f28f send_request_headers.complete
2026-07-03 16:55:40,325 DEBUG [_trace.py:47] 60e384f28f send_request_body.started request=<Request [b'GET']>
2026-07-03 16:55:40,325 DEBUG [_trace.py:47] 60e384f28f send_request_body.complete
2026-07-03 16:55:40,326 DEBUG [_trace.py:47] 60e384f28f receive_response_headers.started request=<Request [b'GET']>
2026-07-03 16:55:40,326 DEBUG [_trace.py:47] 60e384f28f receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:40 GMT'), (b'Content-Length', b'40')])
2026-07-03 16:55:40,326 INFO [_client.py:1025] 60e384f28f HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/install/tasks?page=1&page_size=100 "HTTP/1.1 200 OK"
2026-07-03 16:55:40,326 DEBUG [_trace.py:47] 60e384f28f receive_response_body.started request=<Request [b'GET']>
2026-07-03 16:55:40,326 DEBUG [_trace.py:47] 60e384f28f receive_response_body.complete
2026-07-03 16:55:40,326 DEBUG [_trace.py:47] 60e384f28f response_closed.started
2026-07-03 16:55:40,326 DEBUG [_trace.py:47] 60e384f28f response_closed.complete
2026-07-03 16:55:40,328 INFO [_internal.py:97] 60e384f28f 127.0.0.1 - - [03/Jul/2026 08:55:40] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 -
2026-07-03 16:55:45,351 DEBUG [_trace.py:47] 9b793ea1d4 close.started
2026-07-03 16:55:45,352 DEBUG [_trace.py:47] 9b793ea1d4 close.complete
2026-07-03 16:55:45,352 DEBUG [_trace.py:47] 9b793ea1d4 connect_tcp.started host='192.168.0.188' port=5002 local_address=None timeout=600.0 socket_options=None
2026-07-03 16:55:45,352 DEBUG [_trace.py:47] 9b793ea1d4 connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7346d4278fb0>
2026-07-03 16:55:45,352 DEBUG [_trace.py:47] 9b793ea1d4 send_request_headers.started request=<Request [b'GET']>
2026-07-03 16:55:45,352 DEBUG [_trace.py:47] 9b793ea1d4 send_request_headers.complete
2026-07-03 16:55:45,353 DEBUG [_trace.py:47] 9b793ea1d4 send_request_body.started request=<Request [b'GET']>
2026-07-03 16:55:45,353 DEBUG [_trace.py:47] 9b793ea1d4 send_request_body.complete
2026-07-03 16:55:45,353 DEBUG [_trace.py:47] 9b793ea1d4 receive_response_headers.started request=<Request [b'GET']>
2026-07-03 16:55:45,353 DEBUG [_trace.py:47] 9b793ea1d4 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Type', b'application/json; charset=utf-8'), (b'Date', b'Fri, 03 Jul 2026 08:55:45 GMT'), (b'Content-Length', b'40')])
2026-07-03 16:55:45,353 INFO [_client.py:1025] 9b793ea1d4 HTTP Request: GET http://192.168.0.188:5002/plugin/d8669796-681c-419a-8a68-2fefa954ac92/management/install/tasks?page=1&page_size=100 "HTTP/1.1 200 OK"
2026-07-03 16:55:45,354 DEBUG [_trace.py:47] 9b793ea1d4 receive_response_body.started request=<Request [b'GET']>
2026-07-03 16:55:45,354 DEBUG [_trace.py:47] 9b793ea1d4 receive_response_body.complete
2026-07-03 16:55:45,354 DEBUG [_trace.py:47] 9b793ea1d4 response_closed.started
2026-07-03 16:55:45,354 DEBUG [_trace.py:47] 9b793ea1d4 response_closed.complete
2026-07-03 16:55:45,356 INFO [_internal.py:97] 9b793ea1d4 127.0.0.1 - - [03/Jul/2026 08:55:45] "GET /console/api/workspaces/current/plugin/tasks?page=1&page_size=100 HTTP/1.1" 200 -

Activity

  1. dosubot commented on Jul 3, 2026

    @dosubot

    This matches a bug that was fixed today in PR #38348 [1]. The issue is that the DELETE request returns 204 but leaves behind orphaned ProviderModelCredential records in the database, causing the model to reappear in the list.

    Root cause: The deletion flow removes the ProviderModel record but not the associated credentials. Since the model list can be reconstructed from remaining credentials, deleted models persist [2].

    Fix: Pull the latest main branch — PR #38348 was merged today and addresses this by adding a fallback credential lookup mechanism and fixing the frontend form to properly pass model and model_type fields during deletion [1].

    Workaround (if you can't update immediately): manually remove orphaned credentials from the database:

    SELECT * FROM provider_model_credentials WHERE provider_name LIKE '%xinference%';
    DELETE FROM provider_model_credentials WHERE id = '<the_credential_id>';

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dify with Dosu

  2. leslie2046 commented on Jul 3, 2026

    @leslie2046
    ContributorAuthor

    follow this PR:#36520
    And remove model do not remove credentials is a feature as design.
    so close it.

  3. added
    🐞 bug
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    project#dify🐞 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions