@@ -150,6 +150,26 @@ const CUSTOM_MODEL_CLAUDE_SETTINGS = Schema.decodeSync(ClaudeSettings)({
150150 },
151151 ],
152152});
153+ const ULTRACODE_CUSTOM_MODEL_CLAUDE_SETTINGS = Schema.decodeSync(ClaudeSettings)({
154+ customModels: [
155+ {
156+ slug: "claude-custom-tuned",
157+ capabilities: {
158+ optionDescriptors: [
159+ {
160+ id: "effort",
161+ label: "Reasoning",
162+ type: "select",
163+ options: [
164+ { id: "high", label: "High", isDefault: true },
165+ { id: "ultracode", label: "Ultracode" },
166+ ],
167+ },
168+ ],
169+ },
170+ },
171+ ],
172+ });
153173const CLAUDE_TEST_MODEL_SELECTION = {
154174 instanceId: ProviderInstanceId.make(ClaudeAdapterV2.CLAUDE_PROVIDER),
155175 model: "claude-sonnet-4-6",
@@ -5836,7 +5856,8 @@ describe("ClaudeAdapterV2 background wake turns", () => {
58365856 turn(3, {
58375857 ...normal,
58385858 options: [
5839- { id: "effort", value: "ultracode" },
5859+ { id: "effort", value: "high" },
5860+ { id: "ultracode", value: true },
58405861 { id: "fastMode", value: true },
58415862 ],
58425863 }),
@@ -5845,7 +5866,7 @@ describe("ClaudeAdapterV2 background wake turns", () => {
58455866 yield* harness.runtime.startTurn(turn(4, { ...normal, model: "claude-sonnet-4-6" }));
58465867 yield* settle;
58475868 assert.deepEqual(harness.liveSelectionChanges, [
5848- { effortLevel: "xhigh ", fastMode: true, ultracode: true },
5869+ { effortLevel: "high ", fastMode: true, ultracode: true },
58495870 { model: "claude-sonnet-4-6" },
58505871 { effortLevel: "high", fastMode: null, ultracode: null },
58515872 ]);
@@ -14871,6 +14892,46 @@ describe("ClaudeAdapterV2 background wake turns", () => {
1487114892 ),
1487214893 );
1487314894
14895+ it.effect("sends Ultracode with any effort on a custom model", () =>
14896+ Effect.scoped(
14897+ Effect.gen(function* () {
14898+ const harness = yield* makeWakeHarnessWithOptions({
14899+ settings: ULTRACODE_CUSTOM_MODEL_CLAUDE_SETTINGS,
14900+ });
14901+ yield* harness.runtime.startTurn(
14902+ makeClaudeTestTurnInput({
14903+ threadId: harness.threadId,
14904+ providerThread: harness.providerThread,
14905+ now: yield* DateTime.now,
14906+ attemptId: RunAttemptId.make("attempt-custom-ultracode"),
14907+ text: "Plan the work.",
14908+ attachments: [],
14909+ modelSelection: {
14910+ instanceId: ClaudeAdapterV2.CLAUDE_DEFAULT_INSTANCE_ID,
14911+ model: "claude-custom-tuned",
14912+ options: [
14913+ { id: "effort", value: "high" },
14914+ { id: "ultracode", value: true },
14915+ ],
14916+ },
14917+ }),
14918+ );
14919+ const options = harness.getOpenedOptions()!;
14920+ assert.equal(options.effort, "high");
14921+ assert.equal((options.settings as { ultracode?: boolean }).ultracode, true);
14922+ }).pipe(
14923+ Effect.provide(
14924+ Layer.mergeAll(
14925+ IdAllocator.layer,
14926+ McpProviderSessions.layer,
14927+ NodeServices.layer,
14928+ NodeCrypto.layer,
14929+ ),
14930+ ),
14931+ ),
14932+ ),
14933+ );
14934+
1487414935 it.effect("resolves a subagent's model and effort against the instance's custom models", () =>
1487514936 Effect.scoped(
1487614937 Effect.gen(function* () {
0 commit comments