Skip to content

Migrate provider settings to providers.json#14928

Open
melissa-barca wants to merge 20 commits into
mainfrom
14708-migrate-settings
Open

Migrate provider settings to providers.json#14928
melissa-barca wants to merge 20 commits into
mainfrom
14708-migrate-settings

Conversation

@melissa-barca

@melissa-barca melissa-barca commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Resolves #14708

Migrates Posit Assistant provider settings from Positron into ~/.posit/ai/providers.json using ai-config from https://github.com/posit-dev/ai-lib and marks them deprecated in the Settings editor. Positron still reads its providers from the Positron settings; the read path will be added in #14710.

Migration runs once from the authentication extension's activation. It reads the explicitly-set global values of the deprecated settings, maps them to a providers.json config, and writes the file. It skips if providers.json already carries provider config. A file that exists but doesn't parse or doesn't match the schema counts as populated. On success a toast reports the count with View File and Show Log actions; each mapped setting is logged as source -> providers.json path = value.

Adds the Migrate Provider Settings to providers.json command to run the migration on demand. When providers.json is already populated it prompts before overwriting.

The ai-lib submodule and the ai-config file: dependency are added to the authentication extension; the extension's postinstall runs ai-config's own build.

Migrated settings

Setting providers.json destination
authentication.anthropic.baseUrl providers.anthropic.baseUrl
authentication.anthropic.customHeaders providers.anthropic.customHeaders
authentication.openai-api.baseUrl providers.openai.baseUrl
authentication.openai-api.customHeaders providers.openai.customHeaders
authentication.google.baseUrl providers.gemini.baseUrl
authentication.google.customHeaders providers.gemini.customHeaders
authentication.deepseek-api.baseUrl providers.deepseek.baseUrl
authentication.deepseek-api.customHeaders providers.deepseek.customHeaders
authentication.foundry.baseUrl providers.ms-foundry.baseUrl
authentication.foundry.customHeaders providers.ms-foundry.customHeaders
authentication.openai-compatible.baseUrl providers.openai-compatible.baseUrl
authentication.openai-compatible.customHeaders providers.openai-compatible.customHeaders
authentication.googleVertex.baseUrl providers.google-vertex.baseUrl
authentication.googleVertex.customHeaders providers.google-vertex.customHeaders
authentication.googleVertex.credentials providers.google-vertex.googleCloud.project / .location
authentication.aws.credentials providers.bedrock.aws.profile / .region
authentication.snowflake.credentials providers.snowflake-cortex.snowflake.account / .home
authentication.snowflake.customHeaders providers.snowflake-cortex.customHeaders
positron.assistant.provider.anthropic.enable providers.anthropic.enabled
positron.assistant.provider.openAI.enable providers.openai.enabled
positron.assistant.provider.google.enable providers.gemini.enabled
positron.assistant.provider.amazonBedrock.enable providers.bedrock.enabled
positron.assistant.provider.snowflakeCortex.enable providers.snowflake-cortex.enabled
positron.assistant.provider.msFoundry.enable providers.ms-foundry.enabled
positron.assistant.provider.customProvider.enable providers.openai-compatible.enabled
positron.assistant.provider.positAI.enable providers.positai.enabled
positron.assistant.provider.githubCopilot.enable providers.copilot.enabled
assistant.provider.googleVertex.enabled providers.google-vertex.enabled
assistant.provider.deepseek.enabled providers.deepseek.enabled
positron.assistant.models.overrides.<name> (8) providers.<id>.models.custom + discovery: "off"

Not migrated

Setting Status
positron.assistant.aiExcludes Stays; core AI-context excludes, unrelated to provider configuration.
authentication.aws.inferenceProfileRegion Deprecated; no longer read. Inference profile regions derive from the AWS region.
positron.assistant.models.include Removed; superseded by per-provider models.allow / models.deny in providers.json.
positron.assistant.providerTimeout Dies with the legacy positron-assistant extension.
ai.enabled and assistant.* App/UX configuration; stays in settings.json.

Release Notes

Will be updated with next PR

The first-launch modal prompt is replaced with a silent migration on
activation, guarded by the same hasMigratableSettings and
userProvidersFileIsPopulated checks. The manual command still confirms
before overwriting an existing providers.json.
Match the codebase's terser deprecation-message convention and drop
the stale reference to running the migrate command now that migration
happens automatically.
The success log line now names which providers.json blocks were
written instead of only a count, and the migration toast gains a
Show Log action that reveals the Authentication output channel.
Replace the provider-ID summary with one log line per destination
field, naming the source settings.json key and the dotted
providers.json path it wrote. The toast count stays the number of
distinct source settings; grouped credentials that fan out to several
fields log a line each.
Each migration line now shows the value written to providers.json.
Custom header values can carry auth tokens, so headers log their
names only; all other values (URLs, project/region/account, enabled
flags, model identifiers) log verbatim.
Name Posit Assistant providers as what the file feeds, and say
Positron "now" reads them to signal the new behavior.
@github-actions

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:assistant

Why these tags?
Tag Source
@:critical Always runs (required)
@:assistant Changed files

More on automatic tags from changed files.

readme  valid tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI: migrate settings to new providers.json format

1 participant