Fix Claude tests to create threads with Claude model
The two Claude tests ('forwards claude effort options' and 'restarts claude
sessions when claude effort changes') dispatched turns with provider
'claudeAgent' on thread-1, which was created by createHarness with model
'gpt-5-codex'. The provider validation infers 'codex' for that model,
rejecting the 'claudeAgent' provider mismatch.
Fix by having each Claude test create a dedicated thread with model
'claude-sonnet-4-6' so inferProviderForModel returns 'claudeAgent' and
the validation passes.
Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
e6254a8451
commit
cda0e97dae
1 file changed
+36
-4
@@ -355,11 +355,27 @@ describe("ProviderCommandReactor", () => {
|
||||
const harness = await createHarness();
|
||||
const now = new Date().toISOString();
|
||||
|
||||
await Effect.runPromise(
|
||||
harness.engine.dispatch({
|
||||
type: "thread.create",
|
||||
commandId: CommandId.makeUnsafe("cmd-thread-create-claude"),
|
||||
threadId: ThreadId.makeUnsafe("thread-claude"),
|
||||
projectId: asProjectId("project-1"),
|
||||
title: "Claude Thread",
|
||||
model: "claude-sonnet-4-6",
|
||||
interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE,
|
||||
runtimeMode: "approval-required",
|
||||
branch: null,
|
||||
worktreePath: null,
|
||||
createdAt: now,
|
||||
}),
|
||||
);
|
||||
|
||||
await Effect.runPromise(
|
||||
harness.engine.dispatch({
|
||||
type: "thread.turn.start",
|
||||
commandId: CommandId.makeUnsafe("cmd-turn-start-claude-effort"),
|
||||
threadId: ThreadId.makeUnsafe("thread-1"),
|
||||
threadId: ThreadId.makeUnsafe("thread-claude"),
|
||||
message: {
|
||||
messageId: asMessageId("user-message-claude-effort"),
|
||||
role: "user",
|
||||
@@ -391,7 +407,7 @@ describe("ProviderCommandReactor", () => {
|
||||
},
|
||||
});
|
||||
expect(harness.sendTurn.mock.calls[0]?.[0]).toMatchObject({
|
||||
threadId: ThreadId.makeUnsafe("thread-1"),
|
||||
threadId: ThreadId.makeUnsafe("thread-claude"),
|
||||
model: "claude-sonnet-4-6",
|
||||
modelOptions: {
|
||||
claudeAgent: {
|
||||
@@ -585,11 +601,27 @@ describe("ProviderCommandReactor", () => {
|
||||
const harness = await createHarness();
|
||||
const now = new Date().toISOString();
|
||||
|
||||
await Effect.runPromise(
|
||||
harness.engine.dispatch({
|
||||
type: "thread.create",
|
||||
commandId: CommandId.makeUnsafe("cmd-thread-create-claude-restart"),
|
||||
threadId: ThreadId.makeUnsafe("thread-claude-restart"),
|
||||
projectId: asProjectId("project-1"),
|
||||
title: "Claude Restart Thread",
|
||||
model: "claude-sonnet-4-6",
|
||||
interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE,
|
||||
runtimeMode: "approval-required",
|
||||
branch: null,
|
||||
worktreePath: null,
|
||||
createdAt: now,
|
||||
}),
|
||||
);
|
||||
|
||||
await Effect.runPromise(
|
||||
harness.engine.dispatch({
|
||||
type: "thread.turn.start",
|
||||
commandId: CommandId.makeUnsafe("cmd-turn-start-claude-effort-1"),
|
||||
threadId: ThreadId.makeUnsafe("thread-1"),
|
||||
threadId: ThreadId.makeUnsafe("thread-claude-restart"),
|
||||
message: {
|
||||
messageId: asMessageId("user-message-claude-effort-1"),
|
||||
role: "user",
|
||||
@@ -616,7 +648,7 @@ describe("ProviderCommandReactor", () => {
|
||||
harness.engine.dispatch({
|
||||
type: "thread.turn.start",
|
||||
commandId: CommandId.makeUnsafe("cmd-turn-start-claude-effort-2"),
|
||||
threadId: ThreadId.makeUnsafe("thread-1"),
|
||||
threadId: ThreadId.makeUnsafe("thread-claude-restart"),
|
||||
message: {
|
||||
messageId: asMessageId("user-message-claude-effort-2"),
|
||||
role: "user",
|
||||
|
||||
Reference in new issue
Block a user