Skip to content

[ENHANCEMENT] Per-workspace API profile selection (sticky across restarts) #8010

@hannesrudolph

Description

@hannesrudolph

Type

Enhancement

Problem

Changing the active API configuration profile in one VS Code window also changes it in other windows, which makes it hard to work across multiple projects with different requirements or clients. The selection can also reset when extensions restart.

Context

This affects users who keep multiple workspaces open and need different models/keys per project (e.g., tracking costs per client or using a cheaper model in one workspace and a more capable model in another). Today the selection behaves as global; switching modes or restarting extensions/windows can override the intended profile in a workspace.

Desired behavior

  • Allow scoping the active API profile per workspace (in addition to the current global behavior).
  • Make the selection sticky per workspace and per mode, and restore it after extension or VS Code restarts.
  • Provide a simple control to choose scope when selecting a profile:
    • Global (applies to all windows)
    • Workspace (only this workspace)
  • Optionally support project-level settings to restrict which API keys/profiles are available in a given workspace.

Constraints/Preferences

  • Keep the flow simple and unobtrusive; clearly indicate the current scope and selected profile.
  • Preserve current behavior by default (global), with a setting to make workspace-scoped the default if desired.
  • Helpful for cost isolation, security, and organization workflows.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions