diff options
Diffstat (limited to 'libpanto/src/config.zig')
| -rw-r--r-- | libpanto/src/config.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpanto/src/config.zig b/libpanto/src/config.zig index 7c8a495..f2f04e7 100644 --- a/libpanto/src/config.zig +++ b/libpanto/src/config.zig @@ -122,6 +122,11 @@ pub const AnthropicMessagesConfig = struct { /// between tool calls. Ignored when `thinking == .adaptive` (interleaving /// is automatic there) or `.disabled`. thinking_interleaved: bool = false, + /// Use `Authorization: Bearer ...` instead of `x-api-key`. This is set + /// by the embedder from the configured auth family (not guessed from the + /// base URL): standard Anthropic uses `false`, while OAuth-backed + /// Anthropic-compatible providers such as Copilot set `true`. + use_bearer_auth: bool = false, /// Place one `cache_control` breakpoint on the last cacheable block of /// each request, replicating Anthropic's "automatic caching" (a single /// advancing breakpoint) via the broadly-supported per-block marker @@ -344,6 +349,7 @@ test "ProviderConfig - anthropic_messages variant" { try t.expectEqual(APIStyle.anthropic_messages, cfg.style()); try t.expectEqualStrings("2023-06-01", cfg.anthropic_messages.api_version); try t.expectEqual(@as(u32, 64_000), cfg.anthropic_messages.max_tokens); + try t.expectEqual(false, cfg.anthropic_messages.use_bearer_auth); try t.expectEqual(Thinking.disabled, cfg.anthropic_messages.thinking); try t.expectEqual(Effort.medium, cfg.anthropic_messages.effort); try t.expectEqual(@as(?u32, 32_000), cfg.anthropic_messages.thinking_budget_tokens); |
