discourse/plugins/discourse-ai/app/models
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
..
discourse_ai/ai_bot FEATURE: Star AI bot conversations in sidebar (#39869) 2026-05-14 15:04:31 +10:00
ai_agent.rb FEATURE: Provider-native built-in tools for agents (web search) (#40809) 2026-06-16 14:37:51 -03:00
ai_agent_mcp_server.rb FEATURE: Add MCP server integration to AI agents (#38706) 2026-03-25 17:32:27 +11:00
ai_api_audit_log.rb FEATURE: show conversation spending in debug modal (#39364) 2026-04-20 16:14:38 +10:00
ai_api_request_stat.rb FEATURE: improve performance of llm usage report (#36177) 2025-11-25 06:27:35 +11:00
ai_artifact.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
ai_artifact_key_value.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
ai_artifact_version.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
ai_mcp_oauth_token.rb FEATURE: Add MCP server integration to AI agents (#38706) 2026-03-25 17:32:27 +11:00
ai_mcp_server.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
ai_moderation_setting.rb DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
ai_secret.rb FEATURE: Add MCP server integration to AI agents (#38706) 2026-03-25 17:32:27 +11:00
ai_spam_log.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
ai_summary.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
ai_tool.rb DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
ai_tool_action.rb FEATURE: Add human-in-the-loop approval queue for AI agent tool actions (#38446) 2026-03-13 12:46:59 -03:00
ai_tool_secret_binding.rb FEATURE: add credential bindings for AI tools (#37891) 2026-02-20 07:56:15 +11:00
chat_message_custom_prompt.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
classification_result.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
completion_prompt.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
embedding_definition.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
inferred_concept.rb
inferred_concept_post.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
inferred_concept_topic.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
llm_credit_allocation.rb FIX: Make credit limit reset time translatable (#37226) 2026-02-19 12:36:53 +01:00
llm_credit_daily_usage.rb DEV: Move AI credits daily usage to it's own table (#36369) 2025-12-02 11:54:58 -08:00
llm_feature_credit_cost.rb FEATURE: Hosted LLM credit system (#35162) 2025-10-14 07:48:20 -07:00
llm_model.rb FEATURE: expand vLLM reasoning controls (#40727) 2026-06-11 07:25:28 +10:00
llm_quota.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
llm_quota_usage.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
model_accuracy.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
post_custom_prompt.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
rag_document_fragment.rb DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
reviewable_ai_chat_message.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
reviewable_ai_post.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
reviewable_ai_tool_action.rb FEATURE: Allow nested automation triggers up to a recursion limit (#40672) 2026-06-09 17:03:36 +02:00
shared_ai_conversation.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
shared_ai_conversation.rb.lock FIX: GET preview performs state changes and can publish artifacts even when sharing is denied (#38224) 2026-04-21 15:01:07 +10:00