Book a demo

A 30-minute walkthrough on your real providers. We'll deploy CodeVector against your OpenAI or Anthropic key, configure Claude Code or Cursor live, and answer the questions your security team will ask. No slides.

Request deployment access

Tell us about your deployment and we will send Docker registry credentials for the private image and a license token for your environment.

Docs / GitHub Actions

GitHub Actions

Run Claude Code in GitHub Actions through CodeVector. Wire ANTHROPIC_BASE_URL, custom headers, and a model facade to get PR reviews and @claude replies.

Your gateway URL

Pin your own gateway hostname and we'll rewrite the routes and curl examples on every docs page so you can click straight through to the live console. Stored locally in your browser.

The anthropics/claude-code-action action runs Claude Code inside a GitHub Actions runner. Point it at CodeVector by setting ANTHROPIC_BASE_URL to your gateway’s /gateway/anthropic endpoint, then attribute the spend with custom headers. Every model call is billed against the API key’s user, the same as if it were running on a developer’s laptop.

Prerequisites

  • A CodeVector instance reachable from GitHub-hosted runners (a public URL, or a runner inside your VPC).
  • A per-seat API key with a Model grant for the slug you want the workflow to use. See API keys.
  • A Model facade configured for code review or PR triage (for example, a slug like prreview-model that fans out to Claude Sonnet). See Models.

On-demand workflow: reply to @claude

This workflow runs when someone mentions @claude in an issue, PR comment, or review.

# .github/workflows/claude.yml
name: Claude Code

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
  issues:
    types: [opened, assigned]
  pull_request_review:
    types: [submitted]

jobs:
  claude:
    if: |
      (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
      (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
      (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
      (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      issues: read
      id-token: write
      actions: read

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 1

      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          settings: |
            {"env":{"ANTHROPIC_BASE_URL":"https://your-gateway.example.com/gateway/anthropic","ANTHROPIC_CUSTOM_HEADERS":"x-client-app: claude-code\nx-project: your-repo"},"model":"prreview-model"}
          additional_permissions: |
            actions: read

Replace your-gateway.example.com with your gateway hostname, your-repo with the repo name you want to attribute spend to, and prreview-model with a model slug that exists on your gateway.

Auto review every pull request

This workflow runs on every PR open, push, and reopen. It uses the code-review plugin to drive Claude through a structured review.

# .github/workflows/claude-code-review.yml
name: Claude Code Review

on:
  pull_request:
    types: [opened, synchronize, ready_for_review, reopened]

jobs:
  claude-review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      issues: read
      id-token: write

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 1

      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          settings: |
            {"env":{"ANTHROPIC_BASE_URL":"https://your-gateway.example.com/gateway/anthropic","ANTHROPIC_CUSTOM_HEADERS":"x-client-app: claude-code\nx-project: your-repo"},"model":"prreview-model"}
          plugin_marketplaces: "https://github.com/anthropics/claude-code.git"
          plugins: "code-review@claude-code-plugins"
          prompt: "/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}"

Filter by author, paths, or labels using the if: and paths: keys if you don’t want every PR reviewed. The action’s usage docs cover the available conditions.

The settings field

settings is a JSON string that claude-code-action parses and applies. The two fields that matter for gateway routing are env and model.

  • env.ANTHROPIC_BASE_URL: the Anthropic surface of your gateway, ending in /gateway/anthropic. The action’s underlying SDK appends /v1/messages and other paths automatically.
  • env.ANTHROPIC_CUSTOM_HEADERS: a newline-delimited string of Header: Value pairs. The Anthropic SDK splits on the literal newline that JSON encodes from \n. The gateway reads x-client-app and x-project; everything else passes through to the upstream provider unchanged.
  • model: a Model facade slug on your gateway. Not the upstream Provider Model identifier. If the slug isn’t granted to the API key’s user, the request returns 403.

You can use a YAML block scalar to keep the line readable. The value must still be valid JSON:

settings: |
  {
    "env": {
      "ANTHROPIC_BASE_URL": "https://your-gateway.example.com/gateway/anthropic",
      "ANTHROPIC_CUSTOM_HEADERS": "x-client-app: claude-code\nx-project: your-repo"
    },
    "model": "prreview-model"
  }

Attribution headers

Every gateway request is recorded against the calling user, model, IDE, and project. The two headers above set the IDE and project dimensions:

  • x-client-app: claude-code: identifies the calling tool. Use the same value across CI and developer laptops so admins can see total Claude Code spend in one slice.
  • x-project: <repo-name>: identifies the codebase. Pick a stable slug per repo.

If your team needs PR-level attribution (e.g. spend per pull request), encode the PR number into x-project (x-project: your-repo/pr-123). This expands the cardinality of recorded usage; check with your admin before turning it on across the org.

Frequently asked questions

Which auth input should I use, anthropic_api_key or claude_code_oauth_token?

Use anthropic_api_key. The OAuth token input is for the Claude Code subscription and does not authenticate against your gateway. CodeVector expects a bearer API key, so pass your gateway key via anthropic_api_key.

Can I send the PR number, branch, or commit SHA as headers?

You can add them to ANTHROPIC_CUSTOM_HEADERS, but the gateway only reads x-client-app and x-project today. Other headers pass through to the upstream provider unchanged and are not recorded for attribution. Ask your admin if you need PR-level attribution.

How do I pick the right model slug?

Use any Model facade slug visible on the Available models page or returned by GET /v1/models on the gateway. modelId is the user-facing facade, not the upstream Provider Model. If the slug does not resolve, the workflow run fails with a 404 from the gateway.

Why is the settings field one giant JSON string?

claude-code-action accepts a JSON string for settings. The action parses it and sets the env block as process env vars. You can use a YAML block scalar to keep the line short, but the value must still be valid JSON.

What permissions does the workflow need?

contents: read, pull-requests: read, issues: read, and id-token: write. Add actions: read if you want Claude to read CI results on PRs. Never grant write permissions broader than what the workflow uses.

  • Connect. Wire Claude Code, opencode, and other tools on a developer laptop instead of CI.
  • API keys. Create the per-seat key the workflow signs in with.
  • Available models. The Model facade slugs you can pass to the action.
  • Usage. See the spend each workflow run drives, sliced by clientApp and project.