Several Features Don't Work As Intended When Using The "Plugin" Model Due To Static Capability Flags
Several Features Don't Work as Intended When Using the "Plugin" Model Due to Static Capability Flags
When using the "Plugin" model (id: 'custom'
) as the main AI model in RisuAI, several features that rely on specific model capabilities may not work as expected. This issue arises due to the static capability flags defined for the generic "Plugin" model. In this article, we will delve into the cause of this problem, provide a way to reproduce it, and propose a solution to enhance the getModelInfo
function.
The getModelInfo
function in src/ts/model/modellist.ts#L1410
returns a static definition for the "Plugin" model. This definition currently lacks flags for capabilities like LLMFlags.hasImageInput
. The application logic relies on getModelInfo
to check for these flags. Since the generic "Plugin" definition is missing them, the application assumes the capability is unavailable, even if the underlying plugin script is designed to interact with a multimodal model that supports it.
I encountered this issue when trying to use the gemini-2.5-pro
model via the LBI plugin. As a test, I enabled the "Enable Custom Flags" setting and manually added the flags listed for gemini-2.5-pro
(src/ts/model/modellist.ts#L982
). With these custom flags enabled, image input started working correctly, which seems to support the idea that the missing flags are the issue.
Instead of relying solely on the static flags defined for the generic "Plugin" model (id: 'custom'
), the getModelInfo
function could be enhanced. When id === 'custom'
, it should ideally determine the intended target model associated with the currently selected plugin script (e.g., the LBI plugin might intend to use a model like gemini-2.5-pro-exp
). Once the target model ID is known, getModelInfo
could look up that specific model's definition within the LLMModels
array (src/ts/model/modellist.ts
) and use its defined flags
for the 'custom' model instance. This would allow the application to correctly recognize capabilities like image input when appropriate for the specific plugin being used.
During debugging, I observed that file data is transmitted as base64 strings in the requests. Out of curiosity, was there a particular advantage to this method over using the web standard's FormData
API for handling file uploads in this context? Just wondering about the design choice here.
Enhancing the getModelInfo
function to determine the intended target model associated with the currently selected plugin script would provide several benefits:
- Improved Accuracy: The application would be able to correctly recognize capabilities like image input when appropriate for the specific plugin being used.
- Increased Flexibility: The "Plugin" model would be able to take advantage of the capabilities of the underlying plugin script, even if they are not explicitly defined in the generic "Plugin" model.
- Better User Experience: Users would be able to access features that on specific model capabilities, providing a more comprehensive and user-friendly experience.
In conclusion, the "Plugin" model's static capability flags are the root cause of several features not working as intended. Enhancing the getModelInfo
function to determine the intended target model associated with the currently selected plugin script would provide several benefits, including improved accuracy, increased flexibility, and a better user experience. By making this change, RisuAI can provide a more comprehensive and user-friendly experience for its users.
Q&A: Several Features Don't Work as Intended When Using the "Plugin" Model Due to Static Capability Flags
In our previous article, we discussed the issue of several features not working as intended when using the "Plugin" model due to static capability flags. In this article, we will provide a Q&A section to address some of the common questions and concerns related to this issue.
A: The getModelInfo
function in src/ts/model/modellist.ts#L1410
returns a static definition for the "Plugin" model. This definition currently lacks flags for capabilities like LLMFlags.hasImageInput
. The application logic relies on getModelInfo
to check for these flags. Since the generic "Plugin" definition is missing them, the application assumes the capability is unavailable, even if the underlying plugin script is designed to interact with a multimodal model that supports it.
A: I encountered this issue when trying to use the gemini-2.5-pro
model via the LBI plugin. As a test, I enabled the "Enable Custom Flags" setting and manually added the flags listed for gemini-2.5-pro
(src/ts/model/modellist.ts#L982
). With these custom flags enabled, image input started working correctly, which seems to support the idea that the missing flags are the issue.
A: Instead of relying solely on the static flags defined for the generic "Plugin" model (id: 'custom'
), the getModelInfo
function could be enhanced. When id === 'custom'
, it should ideally determine the intended target model associated with the currently selected plugin script (e.g., the LBI plugin might intend to use a model like gemini-2.5-pro-exp
). Once the target model ID is known, getModelInfo
could look up that specific model's definition within the LLMModels
array (src/ts/model/modellist.ts
) and use its defined flags
for the 'custom' model instance.
A: During debugging, I observed that file data is transmitted as base64 strings in the requests. Out of curiosity, was there a particular advantage to this method over using the web standard's FormData
API for handling file uploads in this context? Just wondering about the design choice here.
A: Enhancing the getModelInfo
function to determine the intended target model associated with the currently selected plugin script would provide several benefits:
- Improved Accuracy: The application would be able to correctly recognize capabilities like image input when appropriate for the specific plugin being used.
- Increased Flexibility: The "Plugin" model would be able to take advantage of the capabilities of the underlying plugin script, even if they are not explicitly defined in the generic "Plugin" model.
- Better User Experience: Users would be able to access features that on specific model capabilities, providing a more comprehensive user-friendly experience.
A: If you are interested in contributing to the enhancement of getModelInfo
, you can start by reviewing the code in src/ts/model/modellist.ts
. You can also reach out to the RisuAI community to discuss your ideas and collaborate with other developers.
In conclusion, the Q&A section provides a comprehensive overview of the issue of several features not working as intended when using the "Plugin" model due to static capability flags. By understanding the cause, proposed solution, and benefits of enhancing getModelInfo
, you can contribute to the improvement of RisuAI and provide a better user experience for its users.