Skip to content

fix: Startup fails when legacy model_type "reranking" exists in DB: "'reranking' is not a valid ModelType'" #34471#34472

Open
hsiong wants to merge 3 commits intolanggenius:mainfrom
hsiong:fix/34471
Open

fix: Startup fails when legacy model_type "reranking" exists in DB: "'reranking' is not a valid ModelType'" #34471#34472
hsiong wants to merge 3 commits intolanggenius:mainfrom
hsiong:fix/34471

Conversation

@hsiong
Copy link
Copy Markdown
Contributor

@hsiong hsiong commented Apr 2, 2026

Summary

fix #34471

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-02 10:05:39.371130604 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-02 10:05:29.831194349 +0000
@@ -313,6 +313,8 @@
   --> extensions/storage/huawei_obs_storage.py:31:20
 ERROR Argument `Module[Crypto.Hash.SHA1] | Unknown` is not assignable to parameter with type `Hash | HashModule` [bad-argument-type]
   --> libs/gmpy2_pkcs10aep_cipher.py:73:49
+ERROR Returned type `object` is not assignable to declared return type `T` [bad-return]
+   --> models/types.py:138:24
 ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
   --> schedule/queue_monitor_task.py:14:21
 ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Pyrefly Diff

No changes detected.

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

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Startup fails when legacy model_type "reranking" exists in DB: "'reranking' is not a valid ModelType'"

1 participant