Skip to content

feat: add model and budget configs to cortex_agent materialization - #20

Merged
Matts52 merged 1 commit into
mainfrom
dbt-cortex-agent-config-support
Jul 28, 2026
Merged

feat: add model and budget configs to cortex_agent materialization#20
Matts52 merged 1 commit into
mainfrom
dbt-cortex-agent-config-support

Conversation

@Matts52

@Matts52 Matts52 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #19. Promotes models.orchestration and orchestration.budget from hand-written spec YAML to first-class config() options in specification mode, mirroring the existing web_search_tool, comment, and profile configs.

  • New model config (string): sets models.orchestration in the spec YAML, e.g. model = 'claude-opus-4'
  • New budget config: accepts a plain int as shorthand for {seconds: <n>}, or a dict with seconds/tokens keys; injects an orchestration.budget block into the spec YAML
  • Adds cortex_agent_render_model_and_budget helper macro that prepends the YAML block before the user's spec body
  • Emits compile-time warnings if the spec body already contains a conflicting top-level models: or orchestration: key, or if either config is used with raw_ddl=true
  • Two new integration test models cover the dict form and integer shorthand

Test plan

  • Run dbt run in integration_tests/agent_with_model_and_budget and agent_with_budget_shorthand should compile and execute without error
  • Inspect target/compiled/ to confirm the YAML preamble (models:, orchestration:) appears correctly before the spec body
  • Verify integer-shorthand budget produces only seconds: (no tokens: line)
  • Confirm the raw_ddl=true warning now names model and budget

🤖 Generated with Claude Code

…loses #19)

Promotes `models.orchestration` and `orchestration.budget` from hand-written
spec YAML to first-class config() options, so the orchestration model and
spending limits can be shared via dbt vars or overridden per environment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Matts52
Matts52 merged commit a42eb10 into main Jul 28, 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.

Support model name and budget (timeout/tokens) as materialization configs in specification mode

1 participant