Skip to content

feat(ai-gateway): Add bedrock how-to for Claude#5942

Merged
fabianrbz merged 7 commits into
release/ai-gateway-2.0from
feat/bedrock-claude
Jul 15, 2026
Merged

feat(ai-gateway): Add bedrock how-to for Claude#5942
fabianrbz merged 7 commits into
release/ai-gateway-2.0from
feat/bedrock-claude

Conversation

@tomek-labuk

Copy link
Copy Markdown
Contributor

Description

Fixes #issue

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

Copilot AI review requested due to automatic review settings July 14, 2026 12:10
@tomek-labuk tomek-labuk requested a review from a team as a code owner July 14, 2026 12:10
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 8e104e7
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a5777031ee0970007769f25
😎 Deploy Preview https://deploy-preview-5942--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

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

Comment thread app/_how-tos/ai-gateway/use-claude-code-with-ai-gateway-bedrock.md Outdated
Comment thread app/_how-tos/ai-gateway/use-claude-code-with-ai-gateway-bedrock.md Outdated
@Guaris Guaris force-pushed the feat/bedrock-claude branch from 26ac1a7 to 956a678 Compare July 14, 2026 16:11
@felderi felderi mentioned this pull request Jul 14, 2026
7 tasks

@felderi felderi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Validation feedback — I stood up an equivalent config end-to-end today (Claude Code → local DP → Kong → AWS Bedrock, returning 200 with a real Claude Haiku response), so the overall shape is correct 👍. A few refinements:

1. Namespace: everything lands in default, not ai-gateway-get-started. There's no _defaults.kongctl.namespace block and the gateway is referenced via _external, so every resource this how-to creates ends up in the default namespace — not the ai-gateway-get-started namespace the kongctl quickstart/prereq sets up. The reason is subtle: child AI Gateway resources (provider/policy/model) inherit their namespace from a managed parent gateway, but with _external the parent is only referenced, not managed, so there's nothing to inherit from → default. If you want these grouped with the quickstart flow:

_defaults:
  kongctl:
    namespace: ai-gateway-get-started

ai_gateways:
  - ref: ai-quickstart
    name: ai-quickstart
    display_name: "ai-quickstart"

(fully declare the gateway instead of _external). Verified on a dev build: _externalNamespace: default; full declaration → Namespace: ai-gateway-get-started with _defaults correctly inherited.

2. The strip list is thinner than current Claude Code needs. The policy removes body [model, output_config], and you compensate client-side with CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1. That works, but stripping the full set at the gateway makes it robust without relying on the client env var:

remove:
  headers: [anthropic-beta]
  querystring: [beta]
  body: [output_config, context_management, mcp_servers, container, service_tier]

That's the set validated against current Claude Code (Bedrock, Azure, and Vertex all reject these Anthropic-only extras). With the fuller strip in place, the CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 step becomes optional rather than required.

3. Minor. Prereq title typo: "Congifure kongctl" → "Configure kongctl". Also, for consistency with the Azure sibling doc, consider model: { name_header: true } vs this doc's model: { alias: ... } — both work, they just differ across the two how-tos.

Nice touch: the "Validate the AI Model" direct-curl step before launching Claude Code is good practice — I've suggested the Azure how-to (#5948) copy it.

@felderi felderi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correction to my earlier review (item #1, namespace). I previously suggested fully declaring the ai_gateways block (with _defaults namespace) instead of _external so the resources land in ai-gateway-get-started. Please disregard that — _external is the right call here, and the doc already has it correct.

The reasoning: the ai-quickstart gateway's control plane and data plane are created and owned by the AI quickstart/bootstrap script. kongctl should only manage the child resources (provider/policy/model) hanging off it — it should not try to own the gateway itself. _external is exactly that: reference/link the gateway without taking declarative ownership. Fully declaring it would make kongctl fight the script for the gateway's lifecycle, which we don't want.

The trade-off I flagged is real but expected, not a bug: because child AI Gateway resources inherit their namespace from a managed parent, and an _external parent isn't managed, the children land in the default namespace regardless of _defaults. That's an accepted consequence of the current split (script owns the gateway, kongctl owns the children) — the clean fix is a fuller kongctl flow down the road, not taking over the gateway in the doc.

Everything else in my original review stands (the strip-list breadth and the minor typo). Sorry for the churn on this one.

@tomek-labuk tomek-labuk force-pushed the feat/bedrock-claude branch from e3a13b2 to 4e23324 Compare July 15, 2026 06:29
Comment thread app/_how-tos/ai-gateway/use-claude-code-with-ai-gateway-bedrock.md Outdated
@fabianrbz fabianrbz merged commit 62c8699 into release/ai-gateway-2.0 Jul 15, 2026
16 of 17 checks passed
@fabianrbz fabianrbz deleted the feat/bedrock-claude branch July 15, 2026 12:17
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.

4 participants