discourse/plugins/discourse-ai/app/controllers/discourse_ai/admin
Rafael dos Santos Silva bc39aacc3d
FEATURE: Provider-native built-in tools for agents (web search) (#40809)
Adds a fourth kind of agent tool: provider-native built-in tools that
the
LLM provider executes server-side, rather than tools Discourse runs and
feeds back. The first one is web search, supported on Gemini (Google
Search
grounding), OpenAI (web search via the Responses API) and Anthropic
(Claude
web search).

Native tools are stored on the agent's `tools` column with a `native-`
prefix, flow to the prompt as a separate `native_tools` list (never as
runnable Tool classes), and each provider dialect renders them into its
own
request payload. Response processors already ignore the server-side
tool/grounding blocks, so the bot loop never tries to execute them.

They are only selectable when the agent forces a default LLM whose
provider
supports the tool; this is enforced both in the editor UI (filtered by
the
selected LLM's `supported_native_tools`) and by server-side validation.

Also fixes the Gemini endpoint sending `function_calling_config` without
any
`function_declarations`, which the API rejects when only native tools
are
present.

---------

Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
2026-06-16 14:37:51 -03:00
..
admin_dashboard_highlights_controller.rb FEATURE: AI highlights for new dashboard (#40740) 2026-06-10 23:00:35 +08:00
ai_agents_controller.rb FEATURE: Provider-native built-in tools for agents (web search) (#40809) 2026-06-16 14:37:51 -03:00
ai_artifacts_controller.rb DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
ai_embeddings_controller.rb DEV: use explicit permit instead of permit! for provider_params (#38632) 2026-03-16 15:42:17 -05:00
ai_features_controller.rb DEV: Add the ability to register an AI module for data explorer (#38891) 2026-04-03 13:59:06 +08:00
ai_llm_quotas_controller.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
ai_llms_controller.rb DEV: exercise streaming in LLM model Run Test (#39983) 2026-05-13 14:09:57 -03:00
ai_mcp_servers_controller.rb FEATURE: Add advanced OAuth options for MCP servers (#38913) 2026-04-01 08:47:23 +11:00
ai_secrets_controller.rb FEATURE: Add MCP server integration to AI agents (#38706) 2026-03-25 17:32:27 +11:00
ai_spam_controller.rb DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
ai_theme_translations_controller.rb FIX: Translate the overrides instead of just the en.yml file (#39291) 2026-04-15 23:44:39 +08:00
ai_tools_controller.rb FIX: Ensure that the current user's guardian is used when running AI tools tests. (#38676) 2026-04-29 16:25:52 -03:00
ai_translations_controller.rb FEATURE: Switch from opt-in to opt-out for categories in AI translations (#40169) 2026-05-26 14:51:04 -04:00
ai_usage_controller.rb FIX: Improve AI report implementation (#40865) 2026-06-15 15:59:34 +10:00
dashboard_controller.rb DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
rag_document_fragments_controller.rb DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00