mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-22 13:01:05 +03:00
Add dynamic AI model catalog and reasoning controls
Fetch and cache the models.dev catalog asynchronously, replacing bundled model lists when catalog data is available while preserving local and user-configured providers. Update live AI Assistant instances after refresh, defer startup requests until the UI is ready, and cancel in-flight catalog requests during shutdown. Prioritize providers with configured credentials and infer each provider's cheapest title-generation model from catalog pricing. Add model reasoning metadata, effort controls, request serialization, chat persistence, and localized UI labels. Refresh the bundled fallback models and support API keys for arbitrary catalog providers. Fix ACP Agent mode message chunks enqueue ordering issue (ACP thought chunks were enqueued twice while answer chunks were enqueued once). Fix UIDropDownList WrapContent sizing so dropdown width follows its text, skin, and padding, and tighten UIDropDown automatic height sizing.
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
|
||||
#include "../plugin.hpp"
|
||||
#include "../pluginmanager.hpp"
|
||||
#include "llmmodelcatalog.hpp"
|
||||
#include "protocol.hpp"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace ecode {
|
||||
|
||||
class LLMChatUI;
|
||||
@@ -64,6 +67,10 @@ class AIAssistantPlugin : public PluginBase {
|
||||
AIAssistantConfig mConfig;
|
||||
Uint32 mAIChatButtonPosCbId{ 0 };
|
||||
std::string mConfigFileError;
|
||||
std::mutex mModelCatalogMutex;
|
||||
std::optional<LLMModelCatalog::Settings> mModelCatalogSettings;
|
||||
std::unique_ptr<LLMModelCatalog> mModelCatalog;
|
||||
bool mModelCatalogRefreshStarted{ false };
|
||||
|
||||
AIAssistantPlugin( PluginManager* pluginManager, bool sync );
|
||||
|
||||
@@ -82,6 +89,10 @@ class AIAssistantPlugin : public PluginBase {
|
||||
void initUI();
|
||||
|
||||
void displayBrokenUserConfigFileWarning();
|
||||
|
||||
void refreshModelCatalogAsync();
|
||||
|
||||
void applyModelCatalog( LLMProviders providers );
|
||||
};
|
||||
|
||||
} // namespace ecode
|
||||
|
||||
Reference in New Issue
Block a user