Skip to content

fix(no-hephaestus-non-gpt): add opt-out for model enforcement#2107

Merged
code-yeongyu merged 4 commits intodevfrom
fix/issue-2054-hephaestus-model-opt-out
Feb 25, 2026
Merged

fix(no-hephaestus-non-gpt): add opt-out for model enforcement#2107
code-yeongyu merged 4 commits intodevfrom
fix/issue-2054-hephaestus-model-opt-out

Conversation

@code-yeongyu
Copy link
Owner

@code-yeongyu code-yeongyu commented Feb 25, 2026

Summary

  • Add agents.hephaestus.allow_non_gpt_model schema support (default behavior unchanged when unset/false).
  • Update no-hephaestus-non-gpt hook to honor this option: still show toast, but only force-switch to Sisyphus when opt-out is disabled.
  • Add hook test coverage for opt-out mode to verify warning toast and no forced agent switch.

Testing

  • bun test src/hooks/no-hephaestus-non-gpt/
  • bun run typecheck

Fixes #2054


Summary by cubic

Adds an opt‑out so Hephaestus can run with non‑GPT models without forcing a switch, and updates provider gating so Hephaestus is not created when only GitHub Copilot is connected. Fixes #2054.

  • New Features

    • Schema: agents.hephaestus.allow_non_gpt_model (optional boolean).
    • Hook: honors the setting. Unset/false → error toast and switch to Sisyphus. True → warning toast only, no switch.
    • Wiring/tests: passes the setting from plugin config and adds coverage for the opt‑out path.
  • Bug Fixes

    • Provider gating: revert adding github-copilot to Hephaestus requiresProvider; update tests to expect Hephaestus is not created with Copilot-only and mock cache to fix flakiness.

Written for commit 9f64e2a. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Additive change with a new optional configuration flag. Logic defaults to existing behavior when the flag is unset. Verified by new tests and zero detected issues by cubic.

…vider

Hephaestus requires GPT models, which can be provided by github-copilot.
The requiresProvider list was missing github-copilot, causing hephaestus
to not be created when github-copilot was the only GPT provider connected.

This also fixes a flaky CI test that documented this expected behavior.
…st expectation

The test 'hephaestus is created when github-copilot provider is connected'
had incorrect expectation. github-copilot does not provide gpt-5.3-codex,
so hephaestus should NOT be created when only github-copilot is connected.

This test was causing CI flakiness due to incorrect assertion and
missing readConnectedProvidersCache mock (state pollution between tests).

Also adds cacheSpy mock for proper isolation.
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 2 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/shared/model-requirements.ts">

<violation number="1">
P1: This line removes `github-copilot` from `requiresProvider`, which contradicts the PR description stating it should be added.</violation>

<violation number="2">
P1: This line removes `github-copilot` from the providers list, which contradicts the PR description stating it should be added.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@code-yeongyu code-yeongyu merged commit 6b5622c into dev Feb 25, 2026
8 checks passed
@code-yeongyu code-yeongyu deleted the fix/issue-2054-hephaestus-model-opt-out branch February 25, 2026 07:16
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]: Don't force model usage with Hephaestus or other models because you're fucking up peoples' workflows

1 participant