feat(ai-gateway): Add bedrock how-to for Claude#5942
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
26ac1a7 to
956a678
Compare
felderi
left a comment
There was a problem hiding this comment.
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: _external → Namespace: 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
left a comment
There was a problem hiding this comment.
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.
e3a13b2 to
4e23324
Compare
Description
Fixes #issue
Preview Links
Checklist
descriptionentry in frontmatter.