@@ -9,6 +9,7 @@ import (
11 "log/slog"
11 "log/slog"
@@ -629,7 +630,7 @@ func (c *coordinator) isAnthropicThinking(model config.SelectedModel) bool {
631func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model config.SelectedModel) (fantasy.Provider, error) {
632func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model config.SelectedModel) (fantasy.Provider, error) {
632− headers := providerCfg.ExtraHeaders
633+ headers := maps.Clone(providerCfg.ExtraHeaders)
634 // handle special headers for anthropic
635 // handle special headers for anthropic
635 if providerCfg.Type == anthropic.Name && c.isAnthropicThinking(model) {
636 if providerCfg.Type == anthropic.Name && c.isAnthropicThinking(model) {
@@ -639,6 +640,7 @@ func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model con
639 headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
640 headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
643+ slog.Info("Headers", "headers", headers)
643 // TODO: make sure we have
645 // TODO: make sure we have
644 apiKey, _ := c.cfg.Resolve(providerCfg.APIKey)
646 apiKey, _ := c.cfg.Resolve(providerCfg.APIKey)