Skip to content

[VS Code] Agent Loop connections are not parameterized on creation #7696

@wsilveiranz

Description

@wsilveiranz

Severity

P2 - High (Major functionality broken)

Describe the Bug with repro steps

**Expected Behavior: **

When a new agent loop connection is persisted to connections.json all its external dependencies are parameterized. That includes resource IDs, endpoints and and keys. The expected format for this should be:

{
  "agentConnections": {
    "agent": {
      "displayName": "connOpenAI",
      "authentication": {
        "type": "Key",
        "key": "@appsetting('agent_openAIKey')"
      },
      "endpoint": "@appsetting('agent_openAIEndpoint')",
      "resourceId": "/subscriptions/@appsetting('agent_subscriptionId')/resourceGroups/@appsetting('agent_resourceGroup')/providers/Microsoft.CognitiveServices/accounts/@appsetting('agent_openAIAccountName')",
      "type": "model"
    }
  }
}

**Current Behavior: **

Agent loop connections are only partially parameterized. Although Key and endpoint are sent to appsettings, subscription, resourcegroup and names are not parameterized:

{
  "agentConnections": {
    "agent": {
      "displayName": "connOpenAI",
      "authentication": {
        "type": "Key",
        "key": "@appsetting('agent_openAIKey')"
      },
      "endpoint": "@appsetting('agent_openAIEndpoint')",
      "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Example-ResourceGroup/providers/Microsoft.CognitiveServices/accounts/example-open-ai",
      "type": "model"
    }
  }
}

**Impact: **

Customers using VS Code and already taking advantage of CI/CD improvements in the tool will have a degraded experience, as they will need to manually reconfigure this component.

Subscription IDs, resource groups and account names will be stored in source control, potentially triggering static analysis components that required no keys or IDs stored in source control.

What type of Logic App Is this happening in?

Consumption (Portal)

Are you experiencing a regression?

No response

Which operating system are you using?

Windows

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

Screenshots or Videos

No response

Environment

  • VS Code: 1.102.0-insider
  • Extension: 5.109.14 (latest)

Additional context

There is some work already done for APIM connections in the code base that can be adapted for this, as they have similar requirements. Ping the DevEx team if required.

Metadata

Metadata

Assignees

Labels

AgenticThis effects workflows using agentic loopVSCodeIssues or PRs specific to VS Code extension

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions