@@ -108,9 +108,22 @@ type ProviderConfig struct {
108108 // Custom system prompt prefix.
109109 SystemPromptPrefix string `json:"system_prompt_prefix,omitempty" jsonschema:"description=Custom prefix to add to system prompts for this provider"`
110110
111− // Extra headers to send with each request to the provider.
111+ // Extra headers to send with each request to the provider. Values
112+ // run through shell expansion at config-load time, so $VAR and
113+ // $(cmd) work the same way they do in MCP headers. A header whose
114+ // value resolves to the empty string (unset bare $VAR under
115+ // lenient nounset, $(echo), or literal "") is omitted from the
116+ // outgoing request rather than sent as "Header:". See PLAN.md
117+ // Phase 2 design decision #18.
112118 ExtraHeaders map[string]string `json:"extra_headers,omitempty" jsonschema:"description=Additional HTTP headers to send with requests"`
113− // Extra body
119+ // ExtraBody is merged verbatim into OpenAI-compatible request
120+ // bodies. String values are NOT shell-expanded: this is a plain
121+ // JSON passthrough so that arbitrary provider-extension fields
122+ // (numbers, nested objects, booleans) round-trip without a
123+ // recursive walker guessing at intent. If you need an env-var-
124+ // driven value at request time, put it in extra_headers, or in
125+ // the provider's top-level api_key / base_url, all of which do
126+ // expand. See PLAN.md Phase 2 design decision #16.
114127 ExtraBody map[string]any `json:"extra_body,omitempty" jsonschema:"description=Additional fields to include in request bodies, only works with openai-compatible providers"`
115128
116129 ProviderOptions map[string]any `json:"provider_options,omitempty" jsonschema:"description=Additional provider-specific options for this provider"`
@@ -174,7 +187,12 @@ type MCPConfig struct {
174187 DisabledTools []string `json:"disabled_tools,omitempty" jsonschema:"description=List of tools from this MCP server to disable,example=get-library-doc"`
175188 Timeout int `json:"timeout,omitempty" jsonschema:"description=Timeout in seconds for MCP server connections,default=15,example=30,example=60,example=120"`
176189
177− // TODO: maybe make it possible to get the value from the env
190+ // Headers are HTTP headers for HTTP/SSE MCP servers. Values run
191+ // through shell expansion at MCP startup, so $VAR and $(cmd)
192+ // work. A header whose value resolves to the empty string (unset
193+ // bare $VAR under lenient nounset, $(echo), or literal "") is
194+ // omitted from the outgoing request rather than sent as
195+ // "Header:". See PLAN.md Phase 2 design decision #18.
178196 Headers map[string]string `json:"headers,omitempty" jsonschema:"description=HTTP headers for HTTP/SSE MCP servers"`
179197}
180198