discourse/plugins/discourse-ai/app/controllers/discourse_ai
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 FEATURE: Provider-native built-in tools for agents (web search) (#40809) 2026-06-16 14:37:51 -03:00
ai_bot SECURITY: restrict visibility of ai bot conversations 2026-05-19 00:26:04 +01:00
ai_helper FIX: Respect category tag restrictions when suggesting tags (#40545) 2026-06-04 09:11:56 +02:00
discord DEV: Ai bot Signature verification uses different body source than action logic (#38294) 2026-03-05 16:30:05 -03:00
discover DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
embeddings DEV: Improve rate limiting on hyde search (#37794) 2026-02-13 17:00:00 -03:00
sentiment FEATURE: Add agent-backed sentiment classification (#40136) 2026-05-26 10:32:54 -03:00
summarization FIX: State-changing summary generation is exposed via GET (CSRFable navigation) (#40232) 2026-05-22 13:59:21 -03:00
translation DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
ai_credits_controller.rb SECURITY: Unscoped status lookups leak restricted metadata 2026-03-19 15:21:28 +00:00
mcp_oauth_controller.rb FIX: Improve MCP OAuth callback error handling (#38889) 2026-03-27 07:34:24 +11:00