Skip to content

fix: correct web_search_tool spec injection and warn on raw_ddl conflict - #15

Merged
Matts52 merged 1 commit into
mainfrom
fix-dbt-cortex-agent-issue-14
Jul 25, 2026
Merged

fix: correct web_search_tool spec injection and warn on raw_ddl conflict#15
Matts52 merged 1 commit into
mainfrom
fix-dbt-cortex-agent-issue-14

Conversation

@Matts52

@Matts52 Matts52 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces the broken DDL-level TOOLS = ({ TYPE = WEB_SEARCH_TOOL }) clause (which fails Snowflake's parser) with a spec-level tool_spec entry appended to the FROM SPECIFICATION YAML body — the syntax Snowflake actually accepts.
  • Emits a compile-time exceptions.warn(...) when web_search_tool, comment, or profile configs are set alongside raw_ddl=true, since those configs were previously silently dropped.
  • Updates README examples and the config reference table to reflect both fixes.

Closes #14.

Test plan

  • dbt compile on a spec-mode model with web_search_tool=true — confirm tools: - tool_spec: appears inside $$...$$, no DDL-level TOOLS = (...) clause
  • dbt compile with raw_ddl=true + web_search_tool=true — confirm warning is printed and DDL is unchanged
  • dbt compile with no web_search_tool — confirm no tools: injection
  • dbt run against Snowflake with web_search_tool=true — confirm agent deploys without parse errors

🤖 Generated with Claude Code

…ct (closes #14)

The DDL-level TOOLS = ({TYPE = WEB_SEARCH_TOOL}) clause emitted by the
previous implementation fails Snowflake's parser. Replace it with a spec-level
tool_spec entry appended to the specification YAML, which is the syntax
Snowflake actually accepts. Also emit a compile-time warning when
web_search_tool, comment, or profile configs are set alongside raw_ddl=true,
since those configs were previously silently dropped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Matts52
Matts52 merged commit 82fe1b5 into main Jul 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_search_tool config is ignored under raw_ddl=true, and its documented DDL syntax fails against Snowflake

1 participant