Conversation
…on (closes #11) Adds a boolean `web_search_tool` config key (default false) that, when true, appends `{ TYPE = WEB_SEARCH_TOOL, NAME = 'web_search' }` to a DDL-level TOOLS clause in the generated CREATE OR REPLACE AGENT statement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #11.
Adds a
web_search_toolboolean config key (defaultfalse) to thecortex_agentmaterialization. When enabled, the generated DDL includes aTOOLSclause with theWEB_SEARCH_TOOLentry — no resource binding required.Usage:
{{ config( materialized = 'cortex_agent', web_search_tool = true ) }}Compiles to:
Setting
web_search_tool = falseor omitting it produces noTOOLSclause.Changes
macros/relations/cortex_agent/create.sql— build atools_listin spec mode; append the web search entry when enabled; renderTOOLS = (...)only when the list is non-emptyintegration_tests/models/agent_with_web_search.sql— new integration test model exercising the new configintegration_tests/macros/assert_agents_exist.sql— addagent_with_web_searchto the expected agent listREADME.md— documentweb_search_toolin the config reference table and add a "Enabling web search" usage sectionTest plan
dbt compileon the newagent_with_web_searchmodel and verify the compiled SQL contains theTOOLS = ( { TYPE = WEB_SEARCH_TOOL, NAME = 'web_search' } )clauseweb_search_toolproduce noTOOLSclausedbt build --target snowflakeinintegration_tests/and confirm all agents are createddbt run-operation assert_agents_exist --target snowflakeand confirmagent_with_web_searchpasses🤖 Generated with Claude Code