Skip to content

Route Claude workflows through Stacklok AI gateway - #1135

Merged
eleftherias merged 1 commit into
mainfrom
route-claude-through-gateway
Sep 3, 2026
Merged

Route Claude workflows through Stacklok AI gateway#1135
eleftherias merged 1 commit into
mainfrom
route-claude-through-gateway

Conversation

@eleftherias

Copy link
Copy Markdown
Member

Description

Replaces the shared ANTHROPIC_API_KEY secret across the three claude-code-action workflows with per-workflow gateway keys, and routes each through the Stacklok AI gateway.

  • claude.yml (@claude mentions) → STACKLOK_GATEWAY_KEY_CLAUDE_TAG
  • autogen-docs-notify.yml (Slack summary composition) → STACKLOK_GATEWAY_KEY_SLACK_NOTIFICATION
  • upstream-release-docs.yml (generation + editorial review) → STACKLOK_GATEWAY_KEY_RELEASE_DOCS

Each claude-code-action step also gets ANTHROPIC_BASE_URL: https://llm-gateway.stacklok.dev/anthropic (a step-level env:, which is how the action reads a custom base URL from the calling workflow) so requests go through the gateway instead of directly to the Anthropic API.

The three new secrets have already been added to the repository.

Type of change

  • Bug fix (typo, broken link, etc.)

Related issues/PRs

N/A

Submitter checklist

Content and formatting

  • N/A — this PR only changes GitHub Actions workflow configuration, not documentation content

Replace the shared ANTHROPIC_API_KEY with per-workflow gateway keys
(STACKLOK_GATEWAY_KEY_CLAUDE_TAG, STACKLOK_GATEWAY_KEY_SLACK_NOTIFICATION,
STACKLOK_GATEWAY_KEY_RELEASE_DOCS) and point each claude-code-action
step at the Stacklok AI gateway via ANTHROPIC_BASE_URL.
Copilot AI lite review requested due to automatic review settings September 3, 2026 09:48
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-website Ready Ready Preview Sep 3, 2026 9:49am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s Claude-based GitHub Actions workflows to route LLM traffic through the Stacklok AI gateway, replacing the shared ANTHROPIC_API_KEY secret with per-workflow gateway keys and setting ANTHROPIC_BASE_URL at the step level for anthropics/claude-code-action.

Changes:

  • Swapped secrets.ANTHROPIC_API_KEY for per-workflow gateway secrets in all claude-code-action steps touched by these workflows.
  • Added ANTHROPIC_BASE_URL: https://llm-gateway.stacklok.dev/anthropic to each claude-code-action step so requests are routed via the Stacklok gateway.
  • Kept the action pinned to the same commit SHA while updating only auth/routing configuration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/claude.yml Routes @claude workflow calls through the Stacklok gateway and uses a dedicated gateway secret.
.github/workflows/autogen-docs-notify.yml Routes Slack summary composition through the Stacklok gateway and uses a dedicated gateway secret.
.github/workflows/upstream-release-docs.yml Routes release-docs generation and editorial review steps through the Stacklok gateway using a dedicated gateway secret.
Suppressed comments (1)

.github/workflows/autogen-docs-notify.yml:163

  • The inline comment says anthropic_api_key is "the separate Anthropic-auth path", but this workflow now uses a Stacklok gateway key and routes through ANTHROPIC_BASE_URL. The comment is misleading and should be updated to reflect the gateway auth path.
          anthropic_api_key: ${{ secrets.STACKLOK_GATEWAY_KEY_SLACK_NOTIFICATION }}
          # Skips claude-code-action's OIDC -> GitHub App token exchange
          # (which needs id-token: write) and uses the job's own minimally
          # scoped GITHUB_TOKEN instead. Unrelated to anthropic_api_key,
          # which is the separate Anthropic-auth path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@eleftherias
eleftherias merged commit cee14a6 into main Sep 3, 2026
6 checks passed
@eleftherias
eleftherias deleted the route-claude-through-gateway branch September 3, 2026 10:22
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.

3 participants