Skip to content

VS Code: autocomplete reference connections and available models #371

@sethjuarez

Description

@sethjuarez

Summary

The VS Code extension should provide autocomplete for reference connections and the models/deployments available through the selected reference connection.

Scenario

A .prompty file can reference a connection configured in the VS Code extension:

model:
  id: ${env:AZURE_OPENAI_CHAT_DEPLOYMENT:gpt-4o-mini}
  provider: foundry
  apiType: chat
  connection:
    kind: reference
    name: dev-models

When authoring this file:

  1. If the cursor is on name: under connection.kind: reference and the user presses Ctrl+Space, the extension should suggest the reference connections already defined/configured in VS Code.
  2. Once a reference connection is selected, if the cursor is on model.id and the user presses Ctrl+Space, the extension should suggest the models/deployments available through that connection.

Expected behavior

The completion list for connection.name should include configured reference connection names, for example:

  • dev-models
  • any other Foundry/OpenAI connections the extension knows about

The completion list for model.id should use the selected reference connection to suggest known available models/deployments, for example:

  • chat deployments exposed by the selected Foundry/Azure OpenAI connection
  • model ids returned by provider model discovery, when available

Ideally completion items would also show useful metadata such as provider/type/endpoint display name, deployment/model capabilities, or whether the model supports chat/responses/structured output/tools.

Actual behavior

The author has to remember and type both the connection name and the model/deployment id manually. These values are easy to mistype, and failures are only discovered at execution time.

Why it matters

Reference connections are the cleanest way to share model connection settings across many .prompty files without duplicating secrets or endpoints. If the extension already knows the configured connection and can discover or cache available models for it, autocomplete should help authors choose valid values directly in VS Code. This would pair well with schema validation for unresolved connection names and invalid/unavailable model ids.

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionRelated to the Prompty VS Code Extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions