From bba0efea114cf71cd18b8ecea860f0c18ab69dcd Mon Sep 17 00:00:00 2001 From: Jocelyn Liu Date: Thu, 5 Mar 2026 18:13:24 -0800 Subject: [PATCH] [AI Chat] [BYOM] Add tool support for custom models in normal profiles (#34456) * [AI Chat] [BYOM] Add supports_tools toggle to custom model settings UI Expose the supports_tools flag in the custom model configuration UI and persist it to prefs, allowing users to enable tool support (e.g., web search) for custom models that support function calling. - Add kCustomModelSupportsTools pref key and persist in GetModelDict/GetCustomModels - Add supportsTools property, handler, and toggle in model_config_ui - Add localized strings for the tool support toggle and tooltip * [AI Chat] [BYOM] Restrict BYOM tool support to normal profiles Add array supported_capabilities model property to filter which models are available for different conversation modes (chat, content agent, etc.). Automatic (depends on tool support flag), Claude Haiku and Sonnet have {CHAT, CONTENT_AGENT}, all other models (including BYOM) have {CHAT} only. --- app/brave_settings_strings.grdp | 6 +++++ .../model_config_ui.html | 26 +++++++++++++++++++ .../model_config_ui.ts | 12 ++++++++- ...ave_settings_localized_strings_provider.cc | 4 +++ .../core/browser/conversation_handler.cc | 11 ++++---- .../ai_chat/core/browser/model_service.cc | 24 +++++++++++++++++ .../ai_chat/core/browser/tools/mock_tool.cc | 4 ++- .../ai_chat/core/browser/tools/mock_tool.h | 4 ++- components/ai_chat/core/browser/tools/tool.cc | 10 +++++-- components/ai_chat/core/browser/tools/tool.h | 4 ++- .../ai_chat/core/common/mojom/common.mojom | 7 +++++ .../components/model_intro/index.test.tsx | 1 + .../components/model_selector/index.test.tsx | 24 ++++++++++++++--- .../page/state/conversation_context.tsx | 6 ++++- .../page/stories/components_panel.tsx | 7 +++++ .../api/untrusted_conversation_api.ts | 6 ++++- .../context_actions_assistant.test.tsx | 2 ++ .../regenerate_answer_menu.test.tsx | 2 ++ .../Messages/AIChatIntroMessageView.swift | 1 + .../Components/Settings/AIChatMenuView.swift | 5 ++++ .../AIChat/WebUI/AIChatCustomModelForm.swift | 1 + 21 files changed, 151 insertions(+), 16 deletions(-) diff --git a/app/brave_settings_strings.grdp b/app/brave_settings_strings.grdp index 1bf83d531ba..d3daba7a5df 100644 --- a/app/brave_settings_strings.grdp +++ b/app/brave_settings_strings.grdp @@ -1683,6 +1683,12 @@ If this model takes image as input, e.g. llama 3.2b vision + + Tool Support + + + If this model supports function calling / tool use + The name of the model as it will appear in the model selection menu diff --git a/browser/resources/settings/brave_leo_assistant_page/model_config_ui.html b/browser/resources/settings/brave_leo_assistant_page/model_config_ui.html index 1de148587cc..cec469c2421 100644 --- a/browser/resources/settings/brave_leo_assistant_page/model_config_ui.html +++ b/browser/resources/settings/brave_leo_assistant_page/model_config_ui.html @@ -316,6 +316,32 @@ on-change="onVisionSupportChanged_"> +
+
+
+ $i18n{braveLeoAssistantInputModelToolSupport} + +
+ $i18n{braveLeoAssistantInputModelToolSupportTooltipInfo} +
+ + + +
+
+
+ + +
> ConversationHandler::GetTools() { std::remove_if( tools.begin(), tools.end(), [&](auto& tool) { - return (!tool->IsSupportedByModel(model) || - !tool->SupportsConversation( - GetIsTemporary(), - associated_content_manager_->HasAssociatedContent(), - conversation_capability_)); + return ( + !tool->IsSupportedByModel(model, conversation_capability_) || + !tool->SupportsConversation( + GetIsTemporary(), + associated_content_manager_->HasAssociatedContent(), + conversation_capability_)); }), tools.end()); diff --git a/components/ai_chat/core/browser/model_service.cc b/components/ai_chat/core/browser/model_service.cc index 28b38cd5b88..f8eb9023a7c 100644 --- a/components/ai_chat/core/browser/model_service.cc +++ b/components/ai_chat/core/browser/model_service.cc @@ -64,6 +64,7 @@ constexpr char kCustomModelSystemPromptKey[] = "model_system_prompt"; constexpr char kCustomModelItemApiKey[] = "api_key"; constexpr char kCustomModelItemKey[] = "key"; constexpr char kCustomModelVisionSupport[] = "vision_support"; +constexpr char kCustomModelSupportsTools[] = "supports_tools"; // When adding new models, especially for display, make sure to add the UI // strings to ai_chat_ui_strings.grdp and ai_chat/core/constants.cc. @@ -111,6 +112,11 @@ const std::vector& GetLeoModels() { model->display_name = "Automatic"; model->vision_support = true; model->supports_tools = features::kAutomaticModelSupportsTools.Get(); + model->supported_capabilities = + model->supports_tools + ? std::vector{mojom::ConversationCapability::CHAT, + mojom::ConversationCapability::CONTENT_AGENT} + : std::vector{mojom::ConversationCapability::CHAT}; model->is_suggested_model = true; model->is_near_model = false; model->options = @@ -132,6 +138,9 @@ const std::vector& GetLeoModels() { model->display_name = "Claude Haiku"; model->vision_support = true; model->supports_tools = true; + model->supported_capabilities = { + mojom::ConversationCapability::CHAT, + mojom::ConversationCapability::CONTENT_AGENT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -154,6 +163,9 @@ const std::vector& GetLeoModels() { model->display_name = "Claude Sonnet"; model->vision_support = true; model->supports_tools = true; + model->supported_capabilities = { + mojom::ConversationCapability::CHAT, + mojom::ConversationCapability::CONTENT_AGENT}; model->is_suggested_model = true; model->is_near_model = false; model->options = @@ -178,6 +190,7 @@ const std::vector& GetLeoModels() { model->display_name = "Llama 3.1 8B"; model->vision_support = false; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -202,6 +215,7 @@ const std::vector& GetLeoModels() { model->display_name = "Qwen VL 30B"; model->vision_support = true; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = true; model->is_near_model = false; model->options = @@ -227,6 +241,7 @@ const std::vector& GetLeoModels() { model->display_name = "GLM 4.7 Flash"; model->vision_support = true; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -252,6 +267,7 @@ const std::vector& GetLeoModels() { model->display_name = "Llama 4 Maverick"; model->vision_support = true; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -277,6 +293,7 @@ const std::vector& GetLeoModels() { model->display_name = "GPT OSS 20B"; model->vision_support = false; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -300,6 +317,7 @@ const std::vector& GetLeoModels() { model->display_name = "GPT OSS 120B"; model->vision_support = false; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -323,6 +341,7 @@ const std::vector& GetLeoModels() { model->display_name = "Mistral Large"; model->vision_support = true; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -346,6 +365,7 @@ const std::vector& GetLeoModels() { model->display_name = "Kimi K2.5"; model->vision_support = false; model->supports_tools = false; + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->is_suggested_model = false; model->is_near_model = false; model->options = @@ -544,6 +564,7 @@ base::DictValue GetModelDict(mojom::ModelPtr model) { model_dict.Set(kCustomModelItemKey, model->key); model_dict.Set(kCustomModelItemLabelKey, model->display_name); model_dict.Set(kCustomModelVisionSupport, model->vision_support); + model_dict.Set(kCustomModelSupportsTools, model->supports_tools); model_dict.Set(kCustomModelItemModelKey, options.model_request_name); model_dict.Set(kCustomModelItemEndpointUrlKey, options.endpoint.spec()); model_dict.Set(kCustomModelItemApiKey, EncryptAPIKey(options.api_key)); @@ -1075,6 +1096,9 @@ const std::vector ModelService::GetCustomModels() { model->display_name = *model_pref.FindString(kCustomModelItemLabelKey); model->vision_support = model_pref.FindBool(kCustomModelVisionSupport).value_or(false); + model->supports_tools = + model_pref.FindBool(kCustomModelSupportsTools).value_or(false); + model->supported_capabilities = {mojom::ConversationCapability::CHAT}; model->options = mojom::ModelOptions::NewCustomModelOptions( std::move(custom_model_opts)); diff --git a/components/ai_chat/core/browser/tools/mock_tool.cc b/components/ai_chat/core/browser/tools/mock_tool.cc index 4d9fe6cae3d..922d8cede6d 100644 --- a/components/ai_chat/core/browser/tools/mock_tool.cc +++ b/components/ai_chat/core/browser/tools/mock_tool.cc @@ -65,7 +65,9 @@ std::optional MockTool::ExtraParams() const { return std::nullopt; } -bool MockTool::IsSupportedByModel(const mojom::Model& model) const { +bool MockTool::IsSupportedByModel( + const mojom::Model& model, + mojom::ConversationCapability conversation_capability) const { return is_supported_by_model_; } diff --git a/components/ai_chat/core/browser/tools/mock_tool.h b/components/ai_chat/core/browser/tools/mock_tool.h index c9fb5961e77..7b42bc75ef9 100644 --- a/components/ai_chat/core/browser/tools/mock_tool.h +++ b/components/ai_chat/core/browser/tools/mock_tool.h @@ -41,7 +41,9 @@ class MockTool : public Tool { std::optional InputProperties() const override; std::optional> RequiredProperties() const override; std::optional ExtraParams() const override; - bool IsSupportedByModel(const mojom::Model& model) const override; + bool IsSupportedByModel( + const mojom::Model& model, + mojom::ConversationCapability conversation_capability) const override; bool SupportsConversation( bool is_temporary, bool has_untrusted_content, diff --git a/components/ai_chat/core/browser/tools/tool.cc b/components/ai_chat/core/browser/tools/tool.cc index 79433bc1b4e..c2286287dd7 100644 --- a/components/ai_chat/core/browser/tools/tool.cc +++ b/components/ai_chat/core/browser/tools/tool.cc @@ -5,6 +5,8 @@ #include "brave/components/ai_chat/core/browser/tools/tool.h" +#include + #include "brave/components/ai_chat/core/common/mojom/ai_chat.mojom.h" #include "brave/components/ai_chat/core/common/mojom/common.mojom.h" @@ -29,9 +31,13 @@ bool Tool::IsAgentTool() const { return false; } -bool Tool::IsSupportedByModel(const mojom::Model& model) const { +bool Tool::IsSupportedByModel( + const mojom::Model& model, + mojom::ConversationCapability conversation_capability) const { // Implementors should add any extra checks in an override. - return model.supports_tools; + return model.supports_tools && std::ranges::find(model.supported_capabilities, + conversation_capability) != + model.supported_capabilities.end(); } std::variant diff --git a/components/ai_chat/core/browser/tools/tool.h b/components/ai_chat/core/browser/tools/tool.h index e63f7a9c227..8bda3dd1681 100644 --- a/components/ai_chat/core/browser/tools/tool.h +++ b/components/ai_chat/core/browser/tools/tool.h @@ -74,7 +74,9 @@ class Tool { // Implementor can check features of the model to determine if the tool is // supported. - virtual bool IsSupportedByModel(const mojom::Model& model) const; + virtual bool IsSupportedByModel( + const mojom::Model& model, + mojom::ConversationCapability conversation_capability) const; // Check if this tool requires user interaction before handling // Returns: diff --git a/components/ai_chat/core/common/mojom/common.mojom b/components/ai_chat/core/common/mojom/common.mojom index 26584882bf5..748b61ff329 100644 --- a/components/ai_chat/core/common/mojom/common.mojom +++ b/components/ai_chat/core/common/mojom/common.mojom @@ -595,6 +595,13 @@ struct Model { bool vision_support; // Model supports tool use bool supports_tools = false; + // Conversation capabilities this model supports. Used to filter which models + // are available for different conversation types (e.g. basic chat, content + // agent, deep research). + // All models that can participate in regular conversations should include + // CHAT. Models approved for agentic contexts (content agent, agent profile) + // should include CONTENT_AGENT, which should be approved by security team. + array supported_capabilities; // Is a suggested model bool is_suggested_model; // Is a Near model diff --git a/components/ai_chat/resources/page/components/model_intro/index.test.tsx b/components/ai_chat/resources/page/components/model_intro/index.test.tsx index fe2610f68b9..2df7eebbb8c 100644 --- a/components/ai_chat/resources/page/components/model_intro/index.test.tsx +++ b/components/ai_chat/resources/page/components/model_intro/index.test.tsx @@ -22,6 +22,7 @@ describe('ModelIntro', () => { visionSupport: false, isSuggestedModel: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isNearModel: false, options: { customModelOptions: undefined, diff --git a/components/ai_chat/resources/page/components/model_selector/index.test.tsx b/components/ai_chat/resources/page/components/model_selector/index.test.tsx index 0bcf3921a24..aa92bf230fb 100644 --- a/components/ai_chat/resources/page/components/model_selector/index.test.tsx +++ b/components/ai_chat/resources/page/components/model_selector/index.test.tsx @@ -24,6 +24,10 @@ describe('ModelSelector', () => { isNearModel: false, visionSupport: true, supportsTools: true, + supportedCapabilities: [ + Mojom.ConversationCapability.CHAT, + Mojom.ConversationCapability.CONTENT_AGENT, + ], options: { customModelOptions: undefined, leoModelOptions: { @@ -42,6 +46,10 @@ describe('ModelSelector', () => { isSuggestedModel: true, isNearModel: false, supportsTools: true, + supportedCapabilities: [ + Mojom.ConversationCapability.CHAT, + Mojom.ConversationCapability.CONTENT_AGENT, + ], visionSupport: true, options: { customModelOptions: undefined, @@ -61,6 +69,7 @@ describe('ModelSelector', () => { isSuggestedModel: false, isNearModel: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], visionSupport: true, options: { customModelOptions: undefined, @@ -80,6 +89,10 @@ describe('ModelSelector', () => { isSuggestedModel: true, isNearModel: true, supportsTools: true, + supportedCapabilities: [ + Mojom.ConversationCapability.CHAT, + Mojom.ConversationCapability.CONTENT_AGENT, + ], visionSupport: true, options: { customModelOptions: undefined, @@ -99,6 +112,7 @@ describe('ModelSelector', () => { isSuggestedModel: false, isNearModel: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], visionSupport: true, options: { customModelOptions: undefined, @@ -119,6 +133,7 @@ describe('ModelSelector', () => { isNearModel: false, visionSupport: true, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], options: { customModelOptions: undefined, leoModelOptions: { @@ -138,6 +153,7 @@ describe('ModelSelector', () => { isNearModel: false, visionSupport: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, options: { leoModelOptions: undefined, @@ -354,10 +370,12 @@ describe('ModelSelector', () => { + 'agent mode', async () => { // Simulate the real context behavior: in agent mode, - // filter models by supportsTools. This mimics the logic + // filter models by supportedCapabilities. This mimics the logic // in Conversation Context. - const filteredModels = mockModels.filter( - (model) => model.supportsTools === true, + const filteredModels = mockModels.filter((model) => + model.supportedCapabilities.includes( + Mojom.ConversationCapability.CONTENT_AGENT, + ), ) renderModelSelector({ diff --git a/components/ai_chat/resources/page/state/conversation_context.tsx b/components/ai_chat/resources/page/state/conversation_context.tsx index 34d540e3bd8..777193cc42a 100644 --- a/components/ai_chat/resources/page/state/conversation_context.tsx +++ b/components/ai_chat/resources/page/state/conversation_context.tsx @@ -124,7 +124,11 @@ export function useProvideConversationContext(props: ConversationContextProps) { const availableModels = React.useMemo(() => { return aiChat.isAIChatAgentProfileFeatureEnabled && aiChat.isAIChatAgentProfile - ? conversationState.allModels.filter((m) => m.supportsTools) + ? conversationState.allModels.filter((m) => + m.supportedCapabilities.includes( + Mojom.ConversationCapability.CONTENT_AGENT, + ), + ) : conversationState.allModels }, [ conversationState.allModels, diff --git a/components/ai_chat/resources/page/stories/components_panel.tsx b/components/ai_chat/resources/page/stories/components_panel.tsx index cda7f74c3f2..4d54b50e1e2 100644 --- a/components/ai_chat/resources/page/stories/components_panel.tsx +++ b/components/ai_chat/resources/page/stories/components_panel.tsx @@ -853,6 +853,7 @@ const MODELS: Mojom.Model[] = [ displayName: 'Model One', visionSupport: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: true, isNearModel: false, options: { @@ -872,6 +873,10 @@ const MODELS: Mojom.Model[] = [ displayName: 'Model Two', visionSupport: true, supportsTools: true, + supportedCapabilities: [ + Mojom.ConversationCapability.CHAT, + Mojom.ConversationCapability.CONTENT_AGENT, + ], isSuggestedModel: true, isNearModel: false, options: { @@ -891,6 +896,7 @@ const MODELS: Mojom.Model[] = [ displayName: 'Model Three', visionSupport: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, isNearModel: false, options: { @@ -910,6 +916,7 @@ const MODELS: Mojom.Model[] = [ displayName: 'Microsoft Phi-3', visionSupport: false, supportsTools: true, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, isNearModel: false, options: { diff --git a/components/ai_chat/resources/untrusted_conversation_frame/api/untrusted_conversation_api.ts b/components/ai_chat/resources/untrusted_conversation_frame/api/untrusted_conversation_api.ts index 8188735b955..70d6ac7b1a2 100644 --- a/components/ai_chat/resources/untrusted_conversation_frame/api/untrusted_conversation_api.ts +++ b/components/ai_chat/resources/untrusted_conversation_frame/api/untrusted_conversation_api.ts @@ -165,7 +165,11 @@ export default function createUntrustedConversationApi( state.allModels = state.conversationCapability === Mojom.ConversationCapability.CONTENT_AGENT - ? state.allModels.filter((model) => model.supportsTools) + ? state.allModels.filter((m) => + m.supportedCapabilities.includes( + Mojom.ConversationCapability.CONTENT_AGENT, + ), + ) : state.allModels api.state.update(state) }, diff --git a/components/ai_chat/resources/untrusted_conversation_frame/components/context_actions_assistant/context_actions_assistant.test.tsx b/components/ai_chat/resources/untrusted_conversation_frame/components/context_actions_assistant/context_actions_assistant.test.tsx index 19a081ce182..d15ed678ae8 100644 --- a/components/ai_chat/resources/untrusted_conversation_frame/components/context_actions_assistant/context_actions_assistant.test.tsx +++ b/components/ai_chat/resources/untrusted_conversation_frame/components/context_actions_assistant/context_actions_assistant.test.tsx @@ -17,6 +17,7 @@ const mockModels: Mojom.Model[] = [ displayName: 'Model One', visionSupport: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, isNearModel: false, options: { @@ -36,6 +37,7 @@ const mockModels: Mojom.Model[] = [ displayName: 'Brave Summary', visionSupport: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, isNearModel: false, options: { diff --git a/components/ai_chat/resources/untrusted_conversation_frame/components/regenerate_answer_menu/regenerate_answer_menu.test.tsx b/components/ai_chat/resources/untrusted_conversation_frame/components/regenerate_answer_menu/regenerate_answer_menu.test.tsx index 671f9099dd5..b4de7a79e5c 100644 --- a/components/ai_chat/resources/untrusted_conversation_frame/components/regenerate_answer_menu/regenerate_answer_menu.test.tsx +++ b/components/ai_chat/resources/untrusted_conversation_frame/components/regenerate_answer_menu/regenerate_answer_menu.test.tsx @@ -15,6 +15,7 @@ const mockModels = [ displayName: 'Model One', visionSupport: false, supportsTools: false, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, isNearModel: false, options: { @@ -34,6 +35,7 @@ const mockModels = [ displayName: 'Model Two', visionSupport: true, supportsTools: true, + supportedCapabilities: [Mojom.ConversationCapability.CHAT], isSuggestedModel: false, isNearModel: false, options: { diff --git a/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatIntroMessageView.swift b/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatIntroMessageView.swift index a29cefe1d04..b4936b6edb1 100644 --- a/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatIntroMessageView.swift +++ b/ios/brave-ios/Sources/AIChat/Components/Messages/AIChatIntroMessageView.swift @@ -114,6 +114,7 @@ struct AIChatIntroMessageView_Previews: PreviewProvider { displayName: "Mixtral 8x7b", visionSupport: false, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false ) diff --git a/ios/brave-ios/Sources/AIChat/Components/Settings/AIChatMenuView.swift b/ios/brave-ios/Sources/AIChat/Components/Settings/AIChatMenuView.swift index e4242fa57df..6511ef93355 100644 --- a/ios/brave-ios/Sources/AIChat/Components/Settings/AIChatMenuView.swift +++ b/ios/brave-ios/Sources/AIChat/Components/Settings/AIChatMenuView.swift @@ -295,6 +295,7 @@ struct AIChatMenuView_Preview: PreviewProvider { displayName: "Mixtral 8x7b", visionSupport: false, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false ), @@ -314,6 +315,7 @@ struct AIChatMenuView_Preview: PreviewProvider { displayName: "Mixtral 8x7b", visionSupport: false, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false ), @@ -332,6 +334,7 @@ struct AIChatMenuView_Preview: PreviewProvider { displayName: "Claude-Instant", visionSupport: false, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false ), @@ -350,6 +353,7 @@ struct AIChatMenuView_Preview: PreviewProvider { displayName: "Llama-2 13b", visionSupport: false, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false ), @@ -368,6 +372,7 @@ struct AIChatMenuView_Preview: PreviewProvider { displayName: "Llama-2 70b", visionSupport: false, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false ), diff --git a/ios/brave-ios/Sources/AIChat/WebUI/AIChatCustomModelForm.swift b/ios/brave-ios/Sources/AIChat/WebUI/AIChatCustomModelForm.swift index 3957f63168e..bb6ae76f8e2 100644 --- a/ios/brave-ios/Sources/AIChat/WebUI/AIChatCustomModelForm.swift +++ b/ios/brave-ios/Sources/AIChat/WebUI/AIChatCustomModelForm.swift @@ -438,6 +438,7 @@ extension AiChat.Model { displayName: "Custom Model", visionSupport: true, supportsTools: false, + supportedCapabilities: [NSNumber(value: AiChat.ConversationCapability.chat.rawValue)], isSuggestedModel: false, isNearModel: false )