diff --git a/src/orchestrator_pm.py b/src/orchestrator_pm.py index 8d9a1253..6bec3e1b 100644 --- a/src/orchestrator_pm.py +++ b/src/orchestrator_pm.py @@ -83,11 +83,17 @@ def generate_tracks(user_request: str, project_config: dict[str, Any], file_item try: # 3. Call Tier 1 Model (Strategic - Pro) # Note: We use gemini-1.5-pro or similar high-reasoning model for Tier 1 - response = ai_client.send( + result = ai_client.send_result( md_content="", # We pass everything in user_message for clarity user_message=user_message, enable_tools=False, ) + if not result.ok: + _err = result.errors[0] if result.errors else None + _msg = _err.ui_message() if _err else "unknown error" + print(f"[orchestrator_pm] send_result failed: {_msg}") + return [] + response = result.data # 4. Parse JSON Output try: # The prompt asks for a JSON array. We need to extract it if the AI added markdown blocks.