AppModelConfig missing tenant_id field #21612

Closed
opened 2026-02-21 20:13:29 -05:00 by yindo · 3 comments
Owner

Originally created by @asukaminato0721 on GitHub (Jan 13, 2026).

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

master

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

https://github.com/langgenius/dify/pull/30919#discussion_r2685888519

✔️ Expected Behavior

no error

Actual Behavior

No response

Originally created by @asukaminato0721 on GitHub (Jan 13, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version master ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce https://github.com/langgenius/dify/pull/30919#discussion_r2685888519 ### ✔️ Expected Behavior no error ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:13:29 -05:00
yindo closed this issue 2026-02-21 20:13:29 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 13, 2026):

AppModelConfig does not have a tenant_id field by design. Instead, tenant_id is managed at the App level, and AppModelConfig links to App via the app_id field. If you encounter errors from passing tenant_id to AppModelConfig, remove tenant_id from those instantiations and use app_id for associations instead. This approach matches the current codebase and recent discussions—see the model definition and related PRs for reference (source, PR discussion). If you need multi-tenancy at the model config level for a specific use case, let me know more about your requirements!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 13, 2026): <!-- Answer --> AppModelConfig does not have a tenant_id field by design. Instead, tenant_id is managed at the App level, and AppModelConfig links to App via the app_id field. If you encounter errors from passing tenant_id to AppModelConfig, remove tenant_id from those instantiations and use app_id for associations instead. This approach matches the current codebase and recent discussions—see the model definition and related PRs for reference ([source](https://github.com/langgenius/dify/blob/a22cc5bc5e2e67fdb84995d840cdc2c4d6441d81/api/models/model.py#L78-L352), [PR discussion](https://github.com/langgenius/dify/pull/30919#discussion_r2685888519)). If you need multi-tenancy at the model config level for a specific use case, let me know more about your requirements! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/818e1968-f5fb-493b-b0fd-2ea3355453a3?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=AppModelConfig%20does%20not%20have%20a%20tenant_id%20field%20by%20design.%20Instead%2C%20tenant_id%20is%20managed%20at%20the%20App%20level%2C%20and%20AppModelConfig%20links%20to%20App%20via%20the%20app_id%20field.%20If%20you%20encounter%20errors%20from%20passing%20tenant_id%20to%20AppModelConfig%2C%20remove%20tenant_id%20from%20those%20instantiations%20and%20use%20app_id%20for%20associations%20instead.%20This%20approach%20matches%20the%20current%20codebase%20and%20recent%20discussions%E2%80%94see%20the%20model%20definition%20and%20related%20PRs%20for%20reference%20%28%5Bsource%5D%28https%3A//github.com/langgenius/dify/blob/a22cc5bc5e2e67fdb84995d840cdc2c4d6441d81/api/models/model.py%23L78-L352%29%2C%20%5BPR%20discussion%5D%28https%3A//github.com/langgenius/dify/pull/30919%23discussion_r2685888519%29%29.%20If%20you%20need%20multi-tenancy%20at%20the%20model%20config%20level%20for%20a%20specific%20use%20case%2C%20let%20me%20know%20more%20about%20your%20requirements%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30921)
Author
Owner

@fatelei commented on GitHub (Jan 13, 2026):

Self Checks

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

Dify version

master

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

#30919 (comment)

✔️ Expected Behavior

no error

Actual Behavior

No response

why need this ?

@fatelei commented on GitHub (Jan 13, 2026): > ### Self Checks > * [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).[x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).[x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.[x] I confirm that I am using English to submit this report, otherwise it will be closed.[x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)[x] Please do not modify this template :) and fill in all the required fields. > > ### Dify version > master > > ### Cloud or Self Hosted > Self Hosted (Source) > > ### Steps to reproduce > [#30919 (comment)](https://github.com/langgenius/dify/pull/30919#discussion_r2685888519) > > ### ✔️ Expected Behavior > no error > > ### ❌ Actual Behavior > _No response_ why need this ?
Author
Owner

@asukaminato0721 commented on GitHub (Jan 14, 2026):

Self Checks

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

Dify version

master

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

#30919 (comment)

✔️ Expected Behavior

no error

Actual Behavior

No response

why need this ?

The test refers to it, I also think not need it.

@asukaminato0721 commented on GitHub (Jan 14, 2026): > > ### Self Checks > > > > > > * [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).[x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).[x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.[x] I confirm that I am using English to submit this report, otherwise it will be closed.[x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)[x] Please do not modify this template :) and fill in all the required fields. > > ### Dify version > > master > > ### Cloud or Self Hosted > > Self Hosted (Source) > > ### Steps to reproduce > > [#30919 (comment)](https://github.com/langgenius/dify/pull/30919#discussion_r2685888519) > > ### ✔️ Expected Behavior > > no error > > ### ❌ Actual Behavior > > _No response_ > > why need this ? The test refers to it, I also think not need it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21612