Migrate provider settings to providers.json#14928
Open
melissa-barca wants to merge 20 commits into
Open
Conversation
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.
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #14708
Migrates Posit Assistant provider settings from Positron into
~/.posit/ai/providers.jsonusingai-configfrom 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.jsonconfig, and writes the file. It skips ifproviders.jsonalready 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 assource -> providers.json path = value.Adds the
Migrate Provider Settings to providers.jsoncommand to run the migration on demand. Whenproviders.jsonis already populated it prompts before overwriting.The
ai-libsubmodule and theai-configfile:dependency are added to the authentication extension; the extension's postinstall runsai-config's own build.Migrated settings
authentication.anthropic.baseUrlproviders.anthropic.baseUrlauthentication.anthropic.customHeadersproviders.anthropic.customHeadersauthentication.openai-api.baseUrlproviders.openai.baseUrlauthentication.openai-api.customHeadersproviders.openai.customHeadersauthentication.google.baseUrlproviders.gemini.baseUrlauthentication.google.customHeadersproviders.gemini.customHeadersauthentication.deepseek-api.baseUrlproviders.deepseek.baseUrlauthentication.deepseek-api.customHeadersproviders.deepseek.customHeadersauthentication.foundry.baseUrlproviders.ms-foundry.baseUrlauthentication.foundry.customHeadersproviders.ms-foundry.customHeadersauthentication.openai-compatible.baseUrlproviders.openai-compatible.baseUrlauthentication.openai-compatible.customHeadersproviders.openai-compatible.customHeadersauthentication.googleVertex.baseUrlproviders.google-vertex.baseUrlauthentication.googleVertex.customHeadersproviders.google-vertex.customHeadersauthentication.googleVertex.credentialsproviders.google-vertex.googleCloud.project/.locationauthentication.aws.credentialsproviders.bedrock.aws.profile/.regionauthentication.snowflake.credentialsproviders.snowflake-cortex.snowflake.account/.homeauthentication.snowflake.customHeadersproviders.snowflake-cortex.customHeaderspositron.assistant.provider.anthropic.enableproviders.anthropic.enabledpositron.assistant.provider.openAI.enableproviders.openai.enabledpositron.assistant.provider.google.enableproviders.gemini.enabledpositron.assistant.provider.amazonBedrock.enableproviders.bedrock.enabledpositron.assistant.provider.snowflakeCortex.enableproviders.snowflake-cortex.enabledpositron.assistant.provider.msFoundry.enableproviders.ms-foundry.enabledpositron.assistant.provider.customProvider.enableproviders.openai-compatible.enabledpositron.assistant.provider.positAI.enableproviders.positai.enabledpositron.assistant.provider.githubCopilot.enableproviders.copilot.enabledassistant.provider.googleVertex.enabledproviders.google-vertex.enabledassistant.provider.deepseek.enabledproviders.deepseek.enabledpositron.assistant.models.overrides.<name>(8)providers.<id>.models.custom+discovery: "off"Not migrated
positron.assistant.aiExcludesauthentication.aws.inferenceProfileRegionpositron.assistant.models.includemodels.allow/models.denyin providers.json.positron.assistant.providerTimeoutai.enabledandassistant.*Release Notes
Will be updated with next PR