From 277f9fb3ed4bfed5bbdfa7f6ea583445360998d2 Mon Sep 17 00:00:00 2001 From: Aleks Clark Date: Wed, 11 Mar 2026 20:52:15 -0500 Subject: [PATCH] feat(bedrock): add WithBaseURL option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows overriding the default Bedrock endpoint URL, enabling use with custom or proxy endpoints. 🐙 Generated with Crush Assisted-by: AWS Claude Opus 4.6 via Crush --- providers/bedrock/bedrock.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/providers/bedrock/bedrock.go b/providers/bedrock/bedrock.go index c8889398cfce102499dc030a8af0d7528ed83042..a430314e2e3caadf64f7244f6caaf6bfca72c0ca 100644 --- a/providers/bedrock/bedrock.go +++ b/providers/bedrock/bedrock.go @@ -65,6 +65,13 @@ func WithUserAgent(ua string) Option { } } +// WithBaseURL sets the base URL for the Bedrock provider. +func WithBaseURL(baseURL string) Option { + return func(o *options) { + o.anthropicOptions = append(o.anthropicOptions, anthropic.WithBaseURL(baseURL)) + } +} + // WithSkipAuth configures whether to skip authentication for the Bedrock provider. func WithSkipAuth(skipAuth bool) Option { return func(o *options) {