Skip to main content

Configure BYOK for dbt Wizard Beta

The dbt Wizard CLI runs in bring-your-own-key (BYOK) mode, which means you supply credentials from a supported provider.

Share your feedback!

We'd love to hear how dbt Wizard is working for you. Share your feedback by either running the /feedback slash command in your interactive terminal session or by going to the #dbt-wizard channel in the dbt Community Slack.

Thanks so much for your help in improving dbt Wizard and dbt data development!

BYOK applies to the CLI only. The dbt platform uses a separate account-level integration.

BYOK works as follows:

  • dbt Wizard calls your chosen provider's API directly using your key.
  • Usage costs appear on your provider account, so token costs are billed directly by whichever provider you choose.

Supported AI providers

dbt Wizard

dbt Wizard supports different AI providers depending on where you use it.

Providerdbt Wizard in dbt platformdbt Wizard CLI
OpenAI✓ (managed or BYOK)✓ (OpenAI subscription or BYOK)
Anthropic✓ (BYOK)✓ (BYOK)
Azure AI Foundry / Azure OpenAI✓ (BYOK)✓ (BYOK)
AWS Bedrock-✓ (BYOK)
Snowflake Cortex-✓ (BYOK)

  • Configure dbt platform integrations in account settings. BYOK is available for Enterprise and Enterprise+ plans.
  • Configure BYOK for the CLI. For OpenAI subscription support in the CLI, run wizard providers configure openai_subscription and follow the prompts.

Configure with wizard providers

Use the providers subcommand to enable a provider and store credentials:

wizard providers list
wizard providers configure openai_subscription # or openai, anthropic, bedrock, azure, snowflake
wizard providers enable openai_subscription

You can also configure providers interactively from an active CLI session with the /providers slash command.

For OpenAI subscription support, run wizard providers configure openai_subscription and follow the prompts. Use wizard providers configure openai if you want to use an OpenAI API key instead.

To store an API key without echoing it in your shell history:

printf '%s' 'sk-...' | wizard providers set-key openai

Credentials are stored in ~/.dbt/wizard/provider-auth.json. Provider settings are stored in ~/.dbt/wizard/providers.json.

Set your API key

The first time you start dbt Wizard in a project, onboarding prompts you to choose a provider:

  1. At the Configure a Provider prompt, select your provider (OpenAI subscription, OpenAI API key, Anthropic, Amazon Bedrock, Azure, or Snowflake).
  2. Paste your API key or cloud credential details when prompted, then press Enter.
  3. Choose an AI model to finish.

To add or switch providers later from an active session, type /providers in the TUI. dbt Wizard stores credentials in ~/.dbt/wizard/provider-auth.json.

To persist provider credentials, use wizard providers configure PROVIDER_NAME, wizard providers set-key PROVIDER_NAME, or the provider's environment variable.

Choose an AI model

You can change the AI model in the following ways:

MethodDescriptionExample
Interactive sessionChange the AI model interactively in the TUI/model
Invocation flagChange the AI model at invocation with the -m flagwizard -m gpt-4o "refactor stg_orders to use incremental materialization"
Config fileSet a default AI model in the config file (~/.dbt/wizard/config.toml); applies to all future sessions. Run wizard debug models to list available model IDs.model = "gpt-4o"

Make sure to restart the dbt Wizard CLI to apply the change.

AWS Bedrock

AWS Bedrock is supported in the CLI only. Wizard uses your local AWS credential chain (environment variables, shared credentials file, or IAM role).

  1. Enable the Bedrock provider:

    wizard providers enable bedrock
  2. Set the AWS Region (and optional profile):

    wizard providers bedrock set-region us-east-1
    wizard providers bedrock set-profile default # optional
  3. Or run the interactive setup:

    wizard providers configure bedrock
  4. Choose a Bedrock AI model with /model in the TUI, or set a default in config.toml. Run wizard debug models to list available model IDs.

Ensure your AWS account has access to the Bedrock models you plan to use.

Snowflake Cortex (preview)

Snowflake Cortex BYOK support in the CLI is in preview. Availability and setup steps may change.

  1. Enable the Snowflake provider when supported in your CLI version:

    wizard providers enable snowflake
  2. Run the interactive setup:

    wizard providers configure snowflake
  3. Ensure your Snowflake account has the privileges required for Cortex LLM functions. Refer to the Snowflake Cortex documentation.

Run wizard providers list to confirm whether Cortex is available in your installed version.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading