Route Claude workflows through Stacklok AI gateway - #1135
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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_KEYfor per-workflow gateway secrets in allclaude-code-actionsteps touched by these workflows. - Added
ANTHROPIC_BASE_URL: https://llm-gateway.stacklok.dev/anthropicto eachclaude-code-actionstep 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_keyis "the separate Anthropic-auth path", but this workflow now uses a Stacklok gateway key and routes throughANTHROPIC_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.
amirejaz
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces the shared
ANTHROPIC_API_KEYsecret across the threeclaude-code-actionworkflows with per-workflow gateway keys, and routes each through the Stacklok AI gateway.claude.yml(@claudementions) →STACKLOK_GATEWAY_KEY_CLAUDE_TAGautogen-docs-notify.yml(Slack summary composition) →STACKLOK_GATEWAY_KEY_SLACK_NOTIFICATIONupstream-release-docs.yml(generation + editorial review) →STACKLOK_GATEWAY_KEY_RELEASE_DOCSEach
claude-code-actionstep also getsANTHROPIC_BASE_URL: https://llm-gateway.stacklok.dev/anthropic(a step-levelenv:, 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
Related issues/PRs
N/A
Submitter checklist
Content and formatting