| 123 | } |
| 124 | |
| 125 | func WithProxiedBaseURL(value string) Opt { |
| 126 | return func(o *HTTPOptions) { |
| 127 | o.Header.Set("X-Cagent-Forward", value) |
| 128 | |
| 129 | // Enforce consistent headers (Anthropic client sets similar header already) |
| 130 | o.Header.Set("X-Cagent-Lang", "go") |
| 131 | o.Header.Set("X-Cagent-OS", runtime.GOOS) |
| 132 | o.Header.Set("X-Cagent-Arch", runtime.GOARCH) |
| 133 | o.Header.Set("X-Cagent-Runtime", "cagent") |
| 134 | o.Header.Set("X-Cagent-Runtime-Version", version.Version) |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | // withCagentIDSource overrides the source of the `X-Cagent-Id` header. |
| 139 | // Unexported because it exists solely so tests can supply a |