[PR #1858] Model Runtime #23263

Closed
opened 2026-02-21 20:20:45 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/1858

State: closed
Merged: Yes


🎉🎉 Dify's Version 0.4 is out now.

We've made some serious under-the-hood changes to how the Model Runtime works, making it more straightforward for our specific needs, and paving the way for smoother model expansions and more robust production use.

What's Changed:

  • Model Runtime Rework: We've moved away from LangChain, simplifying the model layer. Now, expanding models is as easy as setting up the model provider in the backend with a bit of YAML.

    For more details, see: https://github.com/langgenius/dify/blob/feat/model-runtime/api/core/model_runtime/README.md

  • App Generation Update: Replacing the old Redis Pubsub queue with threading.Queue for a more reliable, performant, and straightforward workflow.

  • Model Providers Upgraded: Support for both preset and custom models, ideal for adding OpenAI fine-tuned models or fitting into various MaaS platforms. Plus, you can now check out supported models without any initial configuration.

  • Context Size Definition: Introduced distinct context size settings, separate from Max Tokens, to handle the different limits and sizes in models like OpenAI's GPT-4 Turbo.

  • Flexible Model Parameters: Customize your model's behavior with easily adjustable parameters through YAML.

  • GPT-2 Tokenizer Files: Now cached within Dify's codebase, making builds quicker and solving issues related to acquiring tokenizer files in offline source deployments.

  • Model List Display: The App now displays all supported preset models, including details on any that aren't available and how to configure them.

  • New Model Additions: Including Google's Gemini Pro and Gemini Pro Vision models (Vision requires an image input), Azure OpenAI's GPT-4V, and support for OpenAI-API-compatible providers.

  • Expanded Inference Support: Xorbit Inference now includes chat mode models, and there's a wider range of models supporting Agent inference.

  • Updates & Fixes: We've updated other model providers to be in sync with the latest version APIs and features, and squashed a series of minor bugs for a smoother experience.

Catch you in the code,

The Dify Team 🛠️

**Original Pull Request:** https://github.com/langgenius/dify/pull/1858 **State:** closed **Merged:** Yes --- **🎉🎉 Dify's Version 0.4 is out now.** We've made some serious under-the-hood changes to how the Model Runtime works, making it more straightforward for our specific needs, and paving the way for smoother model expansions and more robust production use. **What's Changed:** - **Model Runtime Rework:** We've moved away from LangChain, simplifying the model layer. Now, expanding models is as easy as setting up the model provider in the backend with a bit of YAML. For more details, see: https://github.com/langgenius/dify/blob/feat/model-runtime/api/core/model_runtime/README.md - **App Generation Update:** Replacing the old `Redis Pubsub` queue with `threading.Queue` for a more reliable, performant, and straightforward workflow. - **Model Providers Upgraded:** Support for both preset and custom models, ideal for adding OpenAI `fine-tuned models` or fitting into various MaaS platforms. Plus, you can now check out supported models without any initial configuration. - **Context Size Definition:** Introduced distinct `context size` settings, separate from `Max Tokens`, to handle the different limits and sizes in models like OpenAI's `GPT-4 Turbo`. - **Flexible Model Parameters:** Customize your model's behavior with easily adjustable parameters through YAML. - **GPT-2 Tokenizer Files:** Now cached within Dify's codebase, making builds quicker and solving issues related to acquiring tokenizer files in offline source deployments. - **Model List Display:** The App now displays all supported preset models, including details on any that aren't available and how to configure them. - **New Model Additions:** Including Google's `Gemini Pro` and `Gemini Pro Vision` models (Vision requires an image input), Azure OpenAI's `GPT-4V`, and support for `OpenAI-API-compatible` providers. - **Expanded Inference Support:** `Xorbit Inference` now includes chat mode models, and there's a wider range of models supporting Agent inference. - **Updates & Fixes:** We've updated other model providers to be in sync with the latest version APIs and features, and squashed a series of minor bugs for a smoother experience. Catch you in the code, The Dify Team 🛠️
yindo added the pull-request label 2026-02-21 20:20:45 -05:00
yindo closed this issue 2026-02-21 20:20:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#23263