fix(ultrawork-model-override): fix thinking config when upgrading variant#2106
Merged
code-yeongyu merged 4 commits intodevfrom Feb 25, 2026
Merged
fix(ultrawork-model-override): fix thinking config when upgrading variant#2106code-yeongyu merged 4 commits intodevfrom
code-yeongyu merged 4 commits intodevfrom
Conversation
…variant string Fixes #2049
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 2/5
- There is a concrete risk of incorrect behavior:
src/plugin/ultrawork-model-override.tsis missing structured thinking config on the main deferred DB path, so the DB can still be overwritten with a raw string variant. - Given the high severity and clear impact on persisted configuration, this feels risky to merge without addressing the missing assignment/deduplication.
- Pay close attention to
src/plugin/ultrawork-model-override.ts- ensure the variant/config is set in the main deferred DB path without duplicate assignments.
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/plugin/ultrawork-model-override.ts">
<violation number="1" location="src/plugin/ultrawork-model-override.ts:121">
P1: The structured thinking config is missing from the main deferred DB path, causing the DB to still be overwritten with a raw string variant.
To fix this and eliminate the duplicated assignments:
1. Move the `variant` and `thinking` assignments to the top of the function (right after checking `if (!override)`).
2. Remove the assignments from the early return blocks.
3. Omit the `override.variant` argument from the `scheduleDeferredModelOverride` call so the DB layer doesn't overwrite the correct memory object.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| if (override.variant) { | ||
| output.message["variant"] = override.variant | ||
| output.message["thinking"] = override.variant | ||
| output.message["thinking"] = { ...ULTRAWORK_THINKING_CONFIG } |
There was a problem hiding this comment.
P1: The structured thinking config is missing from the main deferred DB path, causing the DB to still be overwritten with a raw string variant.
To fix this and eliminate the duplicated assignments:
- Move the
variantandthinkingassignments to the top of the function (right after checkingif (!override)). - Remove the assignments from the early return blocks.
- Omit the
override.variantargument from thescheduleDeferredModelOverridecall so the DB layer doesn't overwrite the correct memory object.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/plugin/ultrawork-model-override.ts, line 121:
<comment>The structured thinking config is missing from the main deferred DB path, causing the DB to still be overwritten with a raw string variant.
To fix this and eliminate the duplicated assignments:
1. Move the `variant` and `thinking` assignments to the top of the function (right after checking `if (!override)`).
2. Remove the assignments from the early return blocks.
3. Omit the `override.variant` argument from the `scheduleDeferredModelOverride` call so the DB layer doesn't overwrite the correct memory object.</comment>
<file context>
@@ -117,7 +118,7 @@ export function applyUltraworkModelOverrideOnMessage(
if (override.variant) {
output.message["variant"] = override.variant
- output.message["thinking"] = override.variant
+ output.message["thinking"] = { ...ULTRAWORK_THINKING_CONFIG }
}
return
</file context>
…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.
There was a problem hiding this comment.
1 issue found across 1 file (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" location="src/shared/model-requirements.ts:27">
P1: GitHub Copilot does not support `gpt-5.3-codex`. Adding it here violates codebase constraints and will break existing tests.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…uiresProvider" This reverts commit 6458fe9.
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
message.thinking.ultrawork-model-overrideand apply the same object assignment in both variant-only and direct-mutation fallback paths.Testing
bun test src/plugin/ 2>&1bun run typecheck 2>&1Fixes #2049
Summary by cubic
Set ultrawork message.thinking to a structured config { type: "enabled", budgetTokens: 16000 } when a variant is applied, and fix Hephaestus provider gating by correcting tests (Copilot-only should not create Hephaestus). Fixes #2049 and stabilizes a flaky CI test.
Written for commit e00f461. Summary will update on new commits.