diff --git a/lib/chat/toolChains/getPrepareStepResult.ts b/lib/chat/toolChains/getPrepareStepResult.ts index 02dd8e71..4362ea48 100644 --- a/lib/chat/toolChains/getPrepareStepResult.ts +++ b/lib/chat/toolChains/getPrepareStepResult.ts @@ -57,7 +57,6 @@ const getPrepareStepResult = (options: PrepareStepOptions): PrepareStepResult | result.messages = options.messages.concat(nextToolItem.messages); } - // Add model if specified for this tool const model = TOOL_MODEL_MAP[nextToolItem.toolName]; if (model) { result.model = model; diff --git a/lib/chat/toolChains/toolChains.ts b/lib/chat/toolChains/toolChains.ts index 1275199d..98f2c6f7 100644 --- a/lib/chat/toolChains/toolChains.ts +++ b/lib/chat/toolChains/toolChains.ts @@ -15,11 +15,25 @@ export type PrepareStepResult = { messages?: ModelMessage[]; }; -// Map specific tools to their required models +// Forced toolChoice is incompatible with Anthropic extended thinking. +// Every tool used in a chain must have a model here to avoid the conflict. export const TOOL_MODEL_MAP: Record = { update_account_info: "gemini-2.5-pro", - // Add other tools that need specific models here - // e.g., create_segments: "gpt-4-turbo", + get_spotify_search: "openai/gpt-5.4-mini", + update_artist_socials: "openai/gpt-5.4-mini", + artist_deep_research: "openai/gpt-5.4-mini", + spotify_deep_research: "openai/gpt-5.4-mini", + get_artist_socials: "openai/gpt-5.4-mini", + get_spotify_artist_top_tracks: "openai/gpt-5.4-mini", + get_spotify_artist_albums: "openai/gpt-5.4-mini", + get_spotify_album: "openai/gpt-5.4-mini", + search_web: "openai/gpt-5.4-mini", + generate_txt_file: "openai/gpt-5.4-mini", + create_segments: "openai/gpt-5.4-mini", + youtube_login: "openai/gpt-5.4-mini", + web_deep_research: "openai/gpt-5.4-mini", + create_knowledge_base: "openai/gpt-5.4-mini", + send_email: "openai/gpt-5.4-mini", }; // Map trigger tool -> sequence AFTER trigger