Go to file
Hongming Wang 0d95b5098a feat(adapter): pre-validate ANTHROPIC_BASE_URL + missing model combo
The 2026-04-30 staging incident traced back to workspaces booting with
ANTHROPIC_BASE_URL pointing at a non-Anthropic shim (MiniMax / OpenAI
gateway) but no explicit model configured. The adapter silently fell
back to "sonnet" — an Anthropic-native alias the upstream didn't
recognize — and the SDK --print probe hung 30s before timing out.
Platform's phantom-busy sweep then nuked the workspace at 10min,
producing "every workspace dead" with the root cause buried in a
30s subprocess hang.

Pre-validate the combo at adapter boot: when ANTHROPIC_BASE_URL host
is non-Anthropic AND no explicit model is set, raise ValueError with
an actionable message pointing to MODEL_PROVIDER / runtime_config.model.
Also log the resolved model + base_url_host every boot so future
failures explain themselves in the workspace logs without digging
into the SDK subprocess.

Tests live under tests/ with their own pytest.ini that anchors rootdir
there — keeps pytest from importing the package __init__.py (which
does the runtime-discovery relative import that requires
molecule_runtime installed). 7 tests cover: misconfig raises with the
right message, Anthropic-native passes, no-base-url passes, custom-url
+ explicit model passes, dataclass + dict shapes, unparseable URL
no-crash. CI runs them on every push/PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 22:35:49 -07:00
.claude feat: initial template content (extracted from molecule-monorepo) 2026-04-16 03:05:40 -07:00
.github/workflows feat(adapter): pre-validate ANTHROPIC_BASE_URL + missing model combo 2026-04-30 22:35:49 -07:00
.molecule-ci/scripts docs: add CI validation scripts (#4) 2026-04-21 03:17:30 +00:00
runbooks docs: add known-issues.md and runbooks/local-dev-setup.md 2026-04-22 08:36:22 +00:00
tests feat(adapter): pre-validate ANTHROPIC_BASE_URL + missing model combo 2026-04-30 22:35:49 -07:00
__init__.py feat: add adapter code + Dockerfile for standalone deployment 2026-04-16 04:27:22 -07:00
.gitignore chore: gitignore credentials for molecule-ai-workspace-template-claude-code 2026-04-16 09:15:36 -07:00
adapter.py feat(adapter): pre-validate ANTHROPIC_BASE_URL + missing model combo 2026-04-30 22:35:49 -07:00
claude_sdk_executor.py fix: migrate claude_sdk_executor to a2a-sdk 1.x (new_text_message) 2026-04-27 05:55:19 -07:00
CLAUDE.md feat: initial template content (extracted from molecule-monorepo) 2026-04-16 03:05:40 -07:00
config.yaml feat(config): split OAuth vs API-key in models[] registry (plugin-dev-agent) 2026-04-22 05:36:03 +00:00
Dockerfile feat: forward client_payload.runtime_version + ARG RUNTIME_VERSION 2026-04-27 07:46:14 -07:00
entrypoint.sh fix: install git + gh CLI for agent autonomy loop (#2) 2026-04-21 00:50:33 +00:00
known-issues.md docs: add known-issues.md and runbooks/local-dev-setup.md 2026-04-22 08:36:22 +00:00
README.md feat: initial template content (extracted from molecule-monorepo) 2026-04-16 03:05:40 -07:00
requirements.txt chore: bump pin to >=0.1.22 (state_transition_history fix) 2026-04-27 07:39:20 -07:00

template-claude-code-default

Molecule AI workspace template for the claude-code-default runtime.

Usage

In Molecule AI canvas

Select this template when creating a new workspace — it appears in the template picker automatically.

From a URL (community install)

Paste this URL when creating a workspace:

github://Molecule-AI/template-claude-code-default

Files

  • config.yaml — workspace configuration (runtime, model, skills, etc.)
  • system-prompt.md — agent system prompt (if present)

Schema version

template_schema_version: 1 — compatible with Molecule AI platform v1.x.

License

Business Source License 1.1 — © Molecule AI.