Skip to content

Claude Desktop integration cannot delete unavailable models: PUT rejects any change to them #4167

Description

@richardfeiliu-a11y

Client or integration

OpenCodex dashboard (Integrations -> Claude tab, clientId=claude-desktop), backed by GET/PUT /api/claude-desktop and POST /api/claude-desktop/apply.

Area

Dashboard

Summary

The Claude Desktop integration page cannot remove models that are no longer available. Stale claudeCode.desktopProfile.assignments accumulate forever: reconcileDesktopProfile only adds new routes and never prunes, while PUT /api/claude-desktop rejects any change touching an unavailable route. There is no supported dashboard path to delete a closed or renamed model. I expected to be able to delete unavailable assignments (or to have a prune action), while still forbidding adding or reassigning unavailable routes.

Reproduction

  1. Let claudeCode.desktopProfile.assignments accumulate stale routes (renamed providers such as GMI/*, Opencode_Go/*, opencode-zen/*, old nested CommandCode/meta/*, retired native/gpt-5.6-*). In my case: 38 assignments, 21 flagged available=false by GET /api/claude-desktop.
  2. In the dashboard Claude tab, or via API, submit a profile that removes the 21 unavailable routes and keeps only the 17 available ones (defaults unchanged, still pointing at available members).
  3. The request fails; nothing is saved.
  4. Root cause in code: PUT /api/claude-desktop in src/server/management/agent-settings-routes.ts compares current.profile.assignments[route] vs parsed.assignments[route] for every model with available=false and throws on any difference; reconcileDesktopProfile in src/claude/desktop-profile.ts only appends missing available models and preserves all stored assignments.

Workaround used (manual, disruptive): back up ~/.opencodex/config.json and the Claude-3p library profile, edit claudeCode.desktopProfile.assignments on disk to keep only the available routes, ocx restart (required because a direct file edit while the proxy runs gets overwritten by the in-memory config on the next apply), then POST /api/claude-desktop/apply, then fully quit and reopen Claude Desktop (it only reads the profile at launch). Verified: GET /api/claude-desktop went from models:38 unavailable:21 to models:17 unavailable:0; library inferenceModels 16 -> 17 (including newly appeared opencode-go/glm-5.3-flash).

Version

2.49.0

Operating system

macOS 26.6.2 (25G83)

Provider and model

Not provider-specific (affects any retired/renamed route wired to Claude Desktop; observed with CommandCode / Stepfun / google-antigravity / nvidia / opencode-go / sensenova / volcengine-agent-plan / xai catalog).

Logs or error output

{"error": "\ud604\uc7ac \uc0ac\uc6a9\ud560 \uc218 \uc5c6\ub294 \ubaa8\ub378\uc740 \uc62e\uae38 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: CommandCode/deepseek/deepseek-v4-flash-vision-exp"}

Redacted configuration

{
  "claudeCode.desktopProfile.defaults": {
    "opus": "CommandCode/deepseek/deepseek-v4-flash",
    "fable": "native/gpt-6-astra",
    "sonnet": "CommandCode/meituan/LongCat-2.0:free",
    "haiku": "Stepfun/step-3.7-flash"
  },
  "assignments_before": 38,
  "unavailable_before": 21,
  "assignments_after": 17,
  "unavailable_after": 0
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

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

    bugSomething isn't workingguiDashboard, tray, settings UI

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions