Skip to content

Fix lifecycle CI: replace defunct Anthropic model IDs and honor CODEFRAME_LIFECYCLE_MODEL#708

Merged
frankbria merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Jun 21, 2026
Merged

Fix lifecycle CI: replace defunct Anthropic model IDs and honor CODEFRAME_LIFECYCLE_MODEL#708
frankbria merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

The "Lifecycle (cli / haiku)" CI job was failing with anthropic.NotFoundError: model: claude-sonnet-4-20250514 — the early Claude 4.0 snapshot IDs are gone, and CODEFRAME_LIFECYCLE_MODEL=haiku set by the workflow was never actually wired into the agent's model selection.

Changes

Invalid model IDs (codeframe/adapters/llm/base.py, codeframe/core/adapters/streaming_chat.py)

  • Replace claude-sonnet-4-20250514claude-sonnet-4-5 for planning/execution/correction/supervision defaults
  • Replace claude-3-5-haiku-20241022claude-haiku-4-5 for generation default
  • Update _DEFAULT_MODEL and pricing map in streaming_chat.py to match

CODEFRAME_LIFECYCLE_MODEL was silently ignored (tests/lifecycle/conftest.py)

  • ModelSelector reads CODEFRAME_PLANNING_MODEL, CODEFRAME_EXECUTION_MODEL, etc. — not CODEFRAME_LIFECYCLE_MODEL. The cf subprocess inherited the alias (haiku/sonnet) but it had no effect, so the agent always fell through to the broken sonnet default.
  • Added _lifecycle_model_env() that translates the alias to all five per-purpose env vars and merged them into every cf subprocess call:
_LIFECYCLE_MODEL_MAP = {
    "haiku": "claude-haiku-4-5",
    "sonnet": "claude-sonnet-4-5",
}

def _lifecycle_model_env() -> dict[str, str]:
    alias = os.getenv("CODEFRAME_LIFECYCLE_MODEL", "haiku")
    model = _LIFECYCLE_MODEL_MAP.get(alias, "claude-haiku-4-5")
    return {
        "CODEFRAME_PLANNING_MODEL": model,
        "CODEFRAME_EXECUTION_MODEL": model,
        "CODEFRAME_GENERATION_MODEL": model,
        "CODEFRAME_CORRECTION_MODEL": model,
        "CODEFRAME_SUPERVISION_MODEL": model,
    }

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'Lifecycle (cli / haiku)' Fix lifecycle CI: replace defunct Anthropic model IDs and honor CODEFRAME_LIFECYCLE_MODEL Jun 21, 2026
Copilot AI requested a review from frankbria June 21, 2026 18:19
@frankbria frankbria marked this pull request as ready for review June 21, 2026 18:42
@frankbria frankbria merged commit 245a502 into main Jun 21, 2026
10 of 11 checks passed
@frankbria frankbria deleted the copilot/fix-failing-github-actions-job branch June 21, 2026 18:44
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.

2 participants