Skip to content

Allow disabling OpenCode Zen locally#1802

Open
devcool20 wants to merge 2675 commits into
different-ai:devfrom
devcool20:fix-local-disable-opencode-zen
Open

Allow disabling OpenCode Zen locally#1802
devcool20 wants to merge 2675 commits into
different-ai:devfrom
devcool20:fix-local-disable-opencode-zen

Conversation

@devcool20
Copy link
Copy Markdown
Contributor

Summary

  • Add a local AI Providers toggle for disabling OpenCode Zen.
  • Persist the local restriction separately from cloud desktop policy.
  • Keep opencode synced with disabled_providers when the local toggle changes.
  • Treat an already-selected OpenCode Zen model as unavailable when Zen is blocked.

Why

  • Local/self-hosted users could not permanently disable OpenCode Zen unless an enterprise cloud policy set blockZenModel.
  • This made OpenCode Zen reappear after restart or new chat, which is a compliance problem for users who need to restrict AI usage to approved providers.

Issue

Scope

  • Local desktop restriction persistence for blockZenModel.
  • AI Providers setting to control the local OpenCode Zen restriction.
  • Provider/model filtering through the existing desktop restriction path.
  • disabled_providers sync for the opencode provider.

Out of scope

  • No changes to cloud organization policy APIs.
  • No new enterprise policy management UI.
  • No changes to OpenCode provider implementation.
  • No broader AI Providers redesign.

Testing

Ran

  • pnpm typecheck
  • git diff --check

Result

  • pass/fail: pass
  • if fail, exact files/errors: N/A

CI status

  • pass: not run locally
  • code-related failures: N/A
  • external/env/auth blockers: N/A

Manual verification

  1. Opened Settings -> AI Providers.
  2. Enabled Disable OpenCode Zen.
  3. Confirmed OpenCode Zen disappeared from the connected providers list.
  4. Confirmed OpenCode Zen models were no longer available for selection.
  5. Restarted the app.
  6. Confirmed OpenCode Zen stayed disabled.
  7. Disabled the toggle and confirmed the local restriction was removed.

Evidence

  • Attached screenshot or screen recording showing the toggle disabling OpenCode Zen and persisting after restart.

Risk

  • Low to medium. The change reuses the existing blockZenModel restriction path but adds local persistence and config sync.

Rollback

  • Revert this PR.
recording-openwork-2.1.mp4

benjaminshafii and others added 30 commits April 28, 2026 17:27
* fix session resume render loop

* guard session cache fallback

---------

Co-authored-by: Benjamin Shafii <benjamin.shafii@gmail.com>
…rent-ai#1608)

- Expand publish-electron job in Release App workflow from macOS-only
  to a 4-target matrix: macOS arm64, macOS x64, Linux x64, Windows x64
- Each target builds sidecars for the correct architecture via TARGET env
- macOS targets get codesign + notarization; Linux/Windows publish unsigned
- Add VITE_OPENWORK_FORCE_MIGRATION_PROMPT dev flag so migration prompt
  can be tested in dev:tauri without a real migration release build
* fix(cloud): avoid blank screen during signin check

* fix(cloud): surface signin while boot overlay waits
* server: harden MCP config validation

* server: require strict remote MCP URL format
…1548)

* feat(settings): add user env vars UI + shell injection

Add a Settings → Environment pane for user-level environment variables
persisted to ~/.config/openwork/env.json (0o600), plus shell and
orchestrator injection so the values reach every child process OpenWork
spawns (OpenCode, OpenWork server, opencode-router).

Fixes the Linux GUI silent-auth-failure case where shell env isn't
inherited. Scope is the OSS / self-hosted path; Den's cloud
LLM Providers push continues to own the org-signed-in case.

Closes different-ai#1436.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(settings): whitelist 'environment' tab in parseSettingsPath

parseSettingsPath had a hardcoded switch listing every known tab. The
new 'environment' case wasn't in it, so /settings/environment fell
through to default: and redirected to /settings/general.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(env-vars): reframe copy around service credentials, not plumbing

The initial copy described env vars in defensive terms ("so the app can
read them without a terminal launch"), which hides the actual value: a
single place to drop credentials for every external service skills and
MCPs call into (ElevenLabs, Gemini image APIs, GitHub, LangSmith, cloud
projects, corporate proxies, etc.).

- Reframe settings.tab_description_environment to lead with user intent.
- Reframe the panel description to mention MCPs + plugin subprocesses
  explicitly, since those are the biggest consumers.
- Empty-state example keys broadened from just ANTHROPIC_API_KEY to a
  cross-section that reflects actual workspace usage.
- PRD "Why" section rewritten on the same axis, with explicit
  non-overlap callouts vs. OpenCode provider auth and Den's cloud
  LLM Providers push.

Copy updates applied to en, zh, ja; other locales fall back to en.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(env-vars): tighten auth, harden UI, expand tests

Server:
- Routes switch from `host` to `host-token` auth. Owner-scoped remote
  bearer tokens are now also rejected — env vars are strictly
  desktop-host-only.
- env-file loader + reserved-keys policy tightened in line with Rust
  / Electron / orchestrator loaders.

Tests:
- env-routes.e2e.test.ts gains owner-bearer rejection + CORS PUT
  preflight tests.
- 23 pass total across env-file + env-routes; full server suite 106/0.

UI:
- environment-view.tsx: ConfirmModal instead of window.confirm,
  request-race guard on refresh, Escape-to-close editor, aria labels,
  cleaner empty / loading state for remote workspaces.

Copy:
- en / zh / ja strings pruned to reflect service-credentials framing;
  PRD updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(env-vars): polish apply flow and evidence

* Harden env var prompt context

* chore(env-vars): add locale fallbacks

* fix env store corruption handling

* block env apply while tasks run

* fix sidecar signing path list

* fix env apply state and store races

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
* polish permission approval UX

* Clarify permission approval risks

* chore(permission): add locale fallbacks

* wire permission prompts through session sync

* tighten permission approval flow
benjaminshafii and others added 25 commits May 12, 2026 20:46
The React port of preferences-view had autoCompactContext hardcoded to
false with a disabled toggle and 'not yet available' alert. The original
Solid app (e47c2ee) wired it to read/write compaction.auto via
openworkClient.patchConfig but this was lost during the React migration.

- Load current compaction.auto from workspace config on mount
- Toggle writes compaction.auto via patchConfig and marks reload required
- Remove disabled attr and unavailable alert from the Switch
…ai#1784)

- Remove Skill Hubs and Shared Workspace sidebar nav items (commented out for easy re-enablement)
- Rename "Shared Workspaces" to "Background Tasks (coming soon)" across all marketing copy
- Update checkout, dashboard, organization, and background-agents screens
- Replace "shared workspace" with "cloud worker" in den-api 402 error messages
- Reframe billing copy around team features instead of shared workspaces
* chore: remove ARCHITECTURE.md and INFRASTRUCTURE.md, clean up AGENTS.md references

* chore: remove DESIGN-LANGUAGE, DESIGN-SYSTEM, PRINCIPLES, PRODUCT, VISION, RELEASE, TRIAGE docs
* feat: Daytona/devcontainer setup for full-stack testing (Den + App, no Electron needed)

* feat: Electron in Daytona via Xvfb + noVNC — real desktop app in the browser, CDP automation on :9825

* fix: Daytona Dockerfile with bun/dbus/vite-host fixes, daytona-dev skill for team

* fix: restore AGENTS.md from dev (remove stale additions)
…different-ai#1787)

* feat: CDP browser tools — direct OpenCode tools, no MCP, multi-target

- .opencode/tools/browser.ts: 7 tools (list, navigate, snapshot, click, fill, eval, screenshot)
- .opencode/tools/lib/cdp.ts: raw WebSocket CDP client, no Puppeteer
- .opencode/tools/lib/snapshot.ts: accessibility tree snapshots with UIDs

Every tool takes browser_url + optional target_id. No singleton browser.
No npx. No MCP subprocess. Works against any Chrome/Electron with CDP.

Tested against Daytona sandbox: target listing, eval, accessibility tree (202 nodes),
screenshot, button discovery all verified.

* fix: rewrite CDP WebSocket URLs when accessing via proxy (Daytona)

* feat: Daytona eval flows, run-evals skill, updated evals README with browser tools

- evals/daytona-flows.md: 3 flows (workspace creation, send message, screenshot)
  with exact code for React fiber dispatch, Lexical input, button clicking
- .opencode/skills/run-evals/SKILL.md: skill that guides agents through
  sandbox creation, service startup, and eval execution
- evals/README.md: updated with Daytona as recommended option, browser_*
  tool reference, conventions for Lexical/React state injection
* feat(inference): add OpenWork inference proxy

* chore(den-api): update generated app version

* chore(desktop): add bootstrap config diagnostics

* chore(inference): log OpenRouter webhook payloads

* chore(inference): log webhook auth diagnostics

* chore(inference): add local dev env defaults

* feat(inference): settle usage from internal pricing

* chore(inference): remove temporary webhook debug logs

* feat(inference): expose OpenWork model catalog

* feat(inference): generate public model catalog

* docs(inference): note upstream model source

* feat(inference): refine usage accounting

* feat(inference): split model catalog hosting

* chore(inference): log proxy issues as errors

* feat(server): configure managed OpenCode models URL

* feat(billing): add Stripe inference subscriptions

* fix(billing): hide owner notice from owners

* fix(billing): only show polar section when feature gate enabled

* chore(billing): remove annual and quantity copy from stripe card

* chore(billing): simplify stripe pricing description

* chore(inference): simplify inference screen copy

* feat(billing): redesign stripe checking page

* chore(billing): remove subscription quantity copy

* feat(inference): show usage limits and update enabled title

* chore(inference): add description above usage limits

* chore(inference): merge usage limits description into card

* feat(inference): redirect disable action to billing

* feat(llm-providers): split openwork keys into table section

* chore(sidebar): rename inference to openwork models and reorder

* chore(inference): use openwork models as page title

* chore(inference): punch up tagline

* chore: sync inference catalog and misc app updates

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
* fix(billing): allow promo codes for Stripe checkout

* chore(billing): rely on configured Stripe price currency

---------

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
…1792)

Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 May 15, 2026 4:38am

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

@devcool20 is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Impossible to disable OpenCode Zen provider locally without enterprise cloud policy