Skip to content

🤖 fix: VS Code webview keeps a policy-revoked model selected #4808

Description

@ThomasK33

Problem

In the VS Code webview, a workspace's selected model can be one the admin policy disallows: persisted from before, seeded from the workspace (#4778), or revoked by a policy refresh. Since #4807 the model dropdown hides disallowed models, but the composer still shows the stored selection as active, and getSendOptionsFromStorage() sends it. Every send then fails with policy_denied until the user picks another model.

This is not a regression: before #4807 the webview also sent that model and got the same denial. Found in Codex review of #4807.

Proposed fix

Reconcile the selection when the policy excludes it, the way the desktop composer does if it has such logic; check ChatInput first. Options: fall back to an allowed model, or disable Send with a clear reason. Reuse the desktop helper instead of adding webview-only logic.

Refs #4739


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $43.37

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions