feat(cli): add workspace set-runtime and set-model commands #23
Reference in New Issue
Block a user
Delete Branch "feat/20-set-runtime-model-commands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #22.
Adds
molecule workspace set-runtimeandmolecule workspace set-modelcommands.Commands
molecule workspace set-runtime <workspace-id> <runtime>— wrapsPATCH /workspaces/:id {runtime}.molecule workspace set-model <workspace-id> <model>— wrapsPUT /workspaces/:id/model.Safety / ordering
set-runtimefetches the workspace's current model and refuses the switch ifthe model is not in the target runtime's offered-models menu, printing the
valid alternatives. This prevents the runtime switch from orphaning the
current model.
set-modelrelies on the workspace-server's fail-closed (runtime, model)validation, so an invalid combo (e.g.
claude-code+gpt-5.5) is rejectedby the platform rather than applied.
(
ErrRuntimeNotInRegistry); every other fetch error is treated as ambiguousand fail-closed.
Test plan
go test ./... -count=1(green)go build ./...(green)SOP Checklist
molecule workspacecommand patterns and client error wrapping.Out-of-scope note: molecule-platform MCP localhost-only limitation is left as a follow-up; no changes here.
🤖 Generated with Claude Code
Pull request closed