Skip to content

Add missing connection env mappings and AWS profile shaping#21

Merged
melissa-barca merged 4 commits into
mainfrom
14710-connection-env-mappings
Jul 22, 2026
Merged

Add missing connection env mappings and AWS profile shaping#21
melissa-barca merged 4 commits into
mainfrom
14710-connection-env-mappings

Conversation

@melissa-barca

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

Copy link
Copy Markdown
Collaborator

Brings ai-config/ai-credentials in sync with functionality Positron already has, ahead of the provider catalog migration (posit-dev/positron#14710).

Adds support for configuring Snowflake via SNOWFLAKE_ACCOUNT, SNOWFLAKE_HOST, and SNOWFLAKE_HOME, and GEAP via GOOGLE_VERTEX_BASE_URL, GOOGLE_VERTEX_PROJECT, and GOOGLE_VERTEX_LOCATION (the latter two as a fallback when GOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATION are unset). Also adds a configured AWS profile to credential shaping, and removes the settings-backed credential config default (callers now inject the config factory).

Removing createVscodeCredentialConfig is safe and necessary due to the addition of getAwsProfile(): its only consumer, Posit Assistant, has supplied its own credential config since posit-dev/assistant#1707, leaving this one reachable only from ai-lib's tests.

Closes #18

SNOWFLAKE_ACCOUNT and SNOWFLAKE_HOME were mapped but SNOWFLAKE_HOST
was not, even though snowflake.host is part of the config schema and
the Positron auth reader already treats it as the preferred host
input for private-link/RCR endpoints.
@melissa-barca
melissa-barca requested a review from wch July 22, 2026 14:04

@wch wch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment, but otherwise looks good.

Also, just a reminder for future reference that when Assistant pulls in this change, it will need to be updated.

Comment on lines +58 to +61
/** AWS region (`authentication.aws.credentials.AWS_REGION`, env on the bridge side). */
getAwsRegion(): string | undefined;
/** AWS profile, from the resolved catalog's `connection.aws.profile`. */
getAwsProfile(): string | undefined;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to combine these into a single getAws(): { region?: string; profile?: string } | undefined. This would match the shape of ResolvedConnection.aws from https://github.com/posit-dev/ai-lib/blob/eab5a4e58/packages/ai-config/src/types.ts#L126, and it would also be more like getSnowflake(), where there's a single function call to get info for the provider.

Matches the shape of ResolvedConnection.aws and the getSnowflake()
pattern of one call per provider.
@melissa-barca
melissa-barca force-pushed the 14710-connection-env-mappings branch from ff957db to df8002f Compare July 22, 2026 14:59
@melissa-barca
melissa-barca enabled auto-merge (squash) July 22, 2026 15:00
@melissa-barca
melissa-barca merged commit 89df9f5 into main Jul 22, 2026
4 checks passed
@melissa-barca
melissa-barca deleted the 14710-connection-env-mappings branch July 22, 2026 15:00
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.

Add missing connection env mappings and AWS profile shaping

2 participants