You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a known regression from PR #34300 in version 1.13.3, which changed the model_type column from String(40) to EnumText(ModelType). Your database still has the legacy value "embeddings", but the enum only recognizes "text-embedding"[1].
To fix it, run these SQL statements against your database to update the legacy values across all affected tables [2]:
UPDATE provider_models SET model_type ='text-embedding'WHERE model_type ='embeddings';
UPDATE provider_models SET model_type ='llm'WHERE model_type ='text-generation';
UPDATE tenant_default_models SET model_type ='text-embedding'WHERE model_type ='embeddings';
UPDATE tenant_default_models SET model_type ='llm'WHERE model_type ='text-generation';
UPDATE provider_model_settings SET model_type ='text-embedding'WHERE model_type ='embeddings';
UPDATE provider_model_settings SET model_type ='llm'WHERE model_type ='text-generation';
UPDATE load_balancing_model_configs SET model_type ='text-embedding'WHERE model_type ='embeddings';
UPDATE load_balancing_model_configs SET model_type ='llm'WHERE model_type ='text-generation';
UPDATE provider_model_credentials SET model_type ='text-embedding'WHERE model_type ='embeddings';
UPDATE provider_model_credentials SET model_type ='llm'WHERE model_type ='text-generation';
This should resolve the error immediately. See #34365 for the earlier report of the same issue.
That said, we cannot impose this requirement on external contributors, for two reasons:
The SOP is private and not accessible to external contributors.
External contributors should not be expected to handle processes that are specific to our SaaS environment.
Regarding the fix and migration strategy, I suggest using _missing_ to map legacy values to the corresponding enum members on read paths. On write paths, continuing to use enum members will allow the stored database values to be updated gradually and safely.
More broadly, before making similar refactors, we should first verify what values are already stored in the database.
Activity
dosubot commentedon Apr 7, 2026
This is a known regression from PR #34300 in version 1.13.3, which changed the
model_typecolumn fromString(40)toEnumText(ModelType). Your database still has the legacy value"embeddings", but the enum only recognizes"text-embedding"[1].To fix it, run these SQL statements against your database to update the legacy values across all affected tables [2]:
This should resolve the error immediately. See #34365 for the earlier report of the same issue.
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
hjlarry commentedon Apr 8, 2026
maybe we should revert #34300 ?
the
to_origin_model_type()seems can't be removed . @asukaminato0721leslie2046 commentedon Apr 8, 2026
agree
fatelei commentedon Apr 8, 2026
should be revert, enum miss some values
asukaminato0721 commentedon Apr 8, 2026
agree
asukaminato0721 commentedon Apr 8, 2026
(or at least a migration script
asukaminato0721 commentedon Apr 8, 2026
I guess need some classmethod to fix it
QuantumGhost commentedon Apr 8, 2026
Please note that a migration plan is required for SaaS deployments. cc @asukaminato0721
Database Migration SOP (internal documentation)
That said, we cannot impose this requirement on external contributors, for two reasons:
Regarding the fix and migration strategy, I suggest using
_missing_to map legacy values to the corresponding enum members on read paths. On write paths, continuing to use enum members will allow the stored database values to be updated gradually and safely.More broadly, before making similar refactors, we should first verify what values are already stored in the database.
QuantumGhost commentedon Apr 8, 2026
The description states that this issue was found in v1.13.3. However, I’ve verified that PR #34300 is not included in the v1.13.3 release.
If this fix is intended for that version, we should cherry-pick it into the
lts/1.13.xbranch.IthacaDream commentedon Apr 8, 2026
@fatelei @QuantumGhost @asukaminato0721
Hi everyone, I may have a simpler approach to fix this. Would you consider it? #34717
leslie2046 commentedon Apr 8, 2026
I just found it in the main branch source code recently,not 1.13.3 release version.
leslie2046 commentedon Apr 8, 2026
And the same issue:
#34365