Add authentication.<configKey>.customHeaders settings#13664
Conversation
Mirror the existing authentication.<configKey>.baseUrl pattern so users can attach extra HTTP headers to every request for each provider whose auth lives in this extension (anthropic, foundry, openai-api, google, openai-compatible). Posit Assistant reads these directly via the VS Code config API; this extension's role here is contribution metadata only (schema, defaults, and Settings-UI intellisense). Addresses posit-dev/positron-assistant#1066. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The runtime read path (Posit Assistant) already supports Snowflake customHeaders end-to-end; this exposes it in the Settings UI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…omHeaders-schema # Conflicts: # extensions/authentication/package.nls.json
|
E2E Tests 🚀 |
|
/recheck-tests |
PETE's assessment 🧪Verdict: Not applicable -- the PR adds only VS Code contribution-point schema ( What changed
Tests in this PRNone. No test files were added or modified. Existing coverageNot applicable. The changes are pure VS Code extension manifest metadata: they tell VS Code what settings exist, their JSON Schema shape, and their Settings-UI descriptions. No runtime code was added or changed in this extension. The actual logic that reads Suggested additionsNone. VS Code contribution point declarations and NLS translation strings are not testable with unit, extension-host, or e2e tests in the normal sense -- correctness is verified by VS Code's own manifest loader and by the manual Settings UI checks described in the PR's validation steps. PETE (Positron Extreme Test Experiment) - LLM-based test-coverage advisor, in pilot. Triggers on PR open and on |
Per review feedback: every customHeaders entry now uses the same two-sentence description, with only the provider name varying. Drops the per-provider SDK-managed header lists and the additive-vs-clobber implementation detail — both noise for a settings.json reader. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses posit-dev/assistant#1066.
Summary
Mirrors the existing
authentication.<configKey>.baseUrlschema with a companionauthentication.<configKey>.customHeaderssetting for each provider whose auth lives in this extension:authentication.anthropic.customHeadersauthentication.foundry.customHeadersauthentication.openai-api.customHeadersauthentication.google.customHeadersauthentication.openai-compatible.customHeadersauthentication.snowflake.customHeadersThis lets users attach extra HTTP headers (e.g. enterprise gateway requirements such as
x-databricks-use-coding-agent-mode) to every request a provider makes.Contribution metadata only — no runtime changes in this extension. Posit Assistant reads
authentication.<configKey>.customHeadersdirectly via the VS Code config API; the schema here just gives the setting defaults and Settings-UI intellisense.Release Notes
New Features
authentication.<configKey>.customHeaderssettings to attach extra HTTP headers to provider requests (posit-dev/assistant#1066)Bug Fixes
Validation Steps
@:posit-assistant
settings.json, set e.g."authentication.openai-api.customHeaders": { "x-foo": "bar" }— confirm JSON intellisense and validation accept the object/string-value shape.x-foo: baris on the outgoing HTTP request."authentication.snowflake.customHeaders": { "x-foo": "bar" }.