Skip to content

Using Claude Code for VS Code with AI-VERDE (AWS Bedrock)

Claude Code for VS Code is Anthropic's official extension for using Claude Code within VS Code. AI-VERDE can serve as the backend for the extension, routing requests through AI-VERDE's budget controls and guardrails to Anthropic Claude models hosted on AWS Bedrock.

Tip

If your course or team's Claude models are hosted on AWS Bedrock, we recommend using this Bedrock-style setup with Claude Code rather than the Anthropic-style setup. Ask your instructor or team lead if you're unsure where your models are hosted.

Prerequisites

  1. Obtain your AI-VERDE API key and note the AI-VERDE base URL. The base URL used in the environment variables ends in /bedrock rather than /v1. Instructions can be found here.
  2. Note the Claude model ID for Opus, Sonnet, and Haiku. Instructions for listing available models can be found here. Model names in AI-VERDE are prefixed with an identifier for your course or team, separated by a dash or a slash (e.g. my-team-claude-sonnet-5 or my-team/claude-sonnet-5).
  3. Install VS Code. Instructions can be found at https://code.visualstudio.com/download.

1. Install the "Claude Code for VS Code" extension from Anthropic

Within the extension marketplace, a simple search for "Claude Code" yields the desired extension.

extension_install

2. Configuring "Claude Code for VS Code" extension

Go to the extension page.

extension_page

Click on the gear icon and select "Settings".

extension_dropdown

Find the setting entry "Claude Code: Disable Login Prompt" and check the box to enable it.

extension_settings

Configuring Environment Variables

Next you will need to configure the extension to use AI-VERDE as the backend for Anthropic Claude models hosted on AWS Bedrock. Set these in the extension's own "Claude Code: Environment Variables" setting. The extension checks this setting before launching, so it is the reliable place for your AI-VERDE credentials; values in ~/.claude/settings.json do not reach the extension's login check.

Find the setting entry "Claude Code: Environment Variables" and click on "Edit in settings.json".

extension_settings

You will need to add the following environment variables to the claudeCode.environmentVariables section of the settings:

  • add your AI-VERDE API key as the ANTHROPIC_AUTH_TOKEN
  • add your Bedrock base URL as ANTHROPIC_BEDROCK_BASE_URL
  • add your team model names for Opus, Sonnet, and Haiku
    "claudeCode.environmentVariables": [
        { "name": "ANTHROPIC_AUTH_TOKEN", "value": "<your-ai-verde-api-key>"},
        { "name": "ANTHROPIC_BEDROCK_BASE_URL", "value":"https://llm-api.cyverse.ai/bedrock"},
        { "name": "CLAUDE_CODE_SKIP_BEDROCK_AUTH", "value":"1"},
        { "name": "CLAUDE_CODE_USE_BEDROCK", "value":"1"},
        { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL", "value":"<model name for opus>"},
        { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL", "value":"<model name for sonnet>"},
        { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL", "value":"<model name for haiku>"}
    ],

For example, with the values filled in:

    "claudeCode.environmentVariables": [
        { "name": "ANTHROPIC_AUTH_TOKEN", "value": "sk-xxxxxxxxxxxxxxxxxxxxxx"},
        { "name": "ANTHROPIC_BEDROCK_BASE_URL", "value":"https://llm-api.cyverse.ai/bedrock"},
        { "name": "CLAUDE_CODE_SKIP_BEDROCK_AUTH", "value":"1"},
        { "name": "CLAUDE_CODE_USE_BEDROCK", "value":"1"},
        { "name": "ANTHROPIC_DEFAULT_OPUS_MODEL", "value":"my-team-claude-opus-5"},
        { "name": "ANTHROPIC_DEFAULT_SONNET_MODEL", "value":"my-team-claude-sonnet-5"},
        { "name": "ANTHROPIC_DEFAULT_HAIKU_MODEL", "value":"my-team-claude-haiku-4-5"}
    ],

Warning

This setting holds your API key. Add it to your VS Code user settings, not to a project's .vscode/settings.json, so the key doesn't get committed with your code.

Note

To obtain the AI-VERDE Bedrock Base URL, simply substitute /v1 with /bedrock, e.g. https://llm-api.cyverse.ai/v1 to https://llm-api.cyverse.ai/bedrock.

Note

This setting only applies to the VS Code extension. To use Claude Code in the terminal as well, configure it separately as described in Using Claude Code on Bedrock.

3. Restart VS Code

You may need to restart VS Code for the environment variables & settings to take effect.

4. Using the extension

The extension has chat functionality accessed from the leftmost bar in VS Code:

chat

You can also open a chat window by clicking on the Claude logo:

code